Skip to content

Commit fe38ea5

Browse files
Ben DooksRussell King
authored andcommitted
[ARM] 3246/1: S3C24XX - retab clock list in arch/arm/mach-s3c2410/clock.c
Patch from Ben Dooks Properly tabulate the clock table in arch/arm/mach-s3c2410/clock.c and put the requisite commas on the end of the structs. Fix the comment about clock enable and disable in the setup code Signed-off-by: Ben Dooks <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent 9d4ae72 commit fe38ea5

File tree

1 file changed

+103
-103
lines changed

1 file changed

+103
-103
lines changed

arch/arm/mach-s3c2410/clock.c

Lines changed: 103 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -253,100 +253,101 @@ struct clk s3c24xx_uclk = {
253253
/* clock definitions */
254254

255255
static struct clk init_clocks[] = {
256-
{ .name = "nand",
257-
.id = -1,
258-
.parent = &clk_h,
259-
.enable = s3c24xx_clkcon_enable,
260-
.ctrlbit = S3C2410_CLKCON_NAND
261-
},
262-
{ .name = "lcd",
263-
.id = -1,
264-
.parent = &clk_h,
265-
.enable = s3c24xx_clkcon_enable,
266-
.ctrlbit = S3C2410_CLKCON_LCDC
267-
},
268-
{ .name = "usb-host",
269-
.id = -1,
270-
.parent = &clk_h,
271-
.enable = s3c24xx_clkcon_enable,
272-
.ctrlbit = S3C2410_CLKCON_USBH
273-
},
274-
{ .name = "usb-device",
275-
.id = -1,
276-
.parent = &clk_h,
277-
.enable = s3c24xx_clkcon_enable,
278-
.ctrlbit = S3C2410_CLKCON_USBD
279-
},
280-
{ .name = "timers",
281-
.id = -1,
282-
.parent = &clk_p,
283-
.enable = s3c24xx_clkcon_enable,
284-
.ctrlbit = S3C2410_CLKCON_PWMT
285-
},
286-
{ .name = "sdi",
287-
.id = -1,
288-
.parent = &clk_p,
289-
.enable = s3c24xx_clkcon_enable,
290-
.ctrlbit = S3C2410_CLKCON_SDI
291-
},
292-
{ .name = "uart",
293-
.id = 0,
294-
.parent = &clk_p,
295-
.enable = s3c24xx_clkcon_enable,
296-
.ctrlbit = S3C2410_CLKCON_UART0
297-
},
298-
{ .name = "uart",
299-
.id = 1,
300-
.parent = &clk_p,
301-
.enable = s3c24xx_clkcon_enable,
302-
.ctrlbit = S3C2410_CLKCON_UART1
303-
},
304-
{ .name = "uart",
305-
.id = 2,
306-
.parent = &clk_p,
307-
.enable = s3c24xx_clkcon_enable,
308-
.ctrlbit = S3C2410_CLKCON_UART2
309-
},
310-
{ .name = "gpio",
311-
.id = -1,
312-
.parent = &clk_p,
313-
.enable = s3c24xx_clkcon_enable,
314-
.ctrlbit = S3C2410_CLKCON_GPIO
315-
},
316-
{ .name = "rtc",
317-
.id = -1,
318-
.parent = &clk_p,
319-
.enable = s3c24xx_clkcon_enable,
320-
.ctrlbit = S3C2410_CLKCON_RTC
321-
},
322-
{ .name = "adc",
323-
.id = -1,
324-
.parent = &clk_p,
325-
.enable = s3c24xx_clkcon_enable,
326-
.ctrlbit = S3C2410_CLKCON_ADC
327-
},
328-
{ .name = "i2c",
329-
.id = -1,
330-
.parent = &clk_p,
331-
.enable = s3c24xx_clkcon_enable,
332-
.ctrlbit = S3C2410_CLKCON_IIC
333-
},
334-
{ .name = "iis",
335-
.id = -1,
336-
.parent = &clk_p,
337-
.enable = s3c24xx_clkcon_enable,
338-
.ctrlbit = S3C2410_CLKCON_IIS
339-
},
340-
{ .name = "spi",
341-
.id = -1,
342-
.parent = &clk_p,
343-
.enable = s3c24xx_clkcon_enable,
344-
.ctrlbit = S3C2410_CLKCON_SPI
345-
},
346-
{ .name = "watchdog",
347-
.id = -1,
348-
.parent = &clk_p,
349-
.ctrlbit = 0
256+
{
257+
.name = "nand",
258+
.id = -1,
259+
.parent = &clk_h,
260+
.enable = s3c24xx_clkcon_enable,
261+
.ctrlbit = S3C2410_CLKCON_NAND,
262+
}, {
263+
.name = "lcd",
264+
.id = -1,
265+
.parent = &clk_h,
266+
.enable = s3c24xx_clkcon_enable,
267+
.ctrlbit = S3C2410_CLKCON_LCDC,
268+
}, {
269+
.name = "usb-host",
270+
.id = -1,
271+
.parent = &clk_h,
272+
.enable = s3c24xx_clkcon_enable,
273+
.ctrlbit = S3C2410_CLKCON_USBH,
274+
}, {
275+
.name = "usb-device",
276+
.id = -1,
277+
.parent = &clk_h,
278+
.enable = s3c24xx_clkcon_enable,
279+
.ctrlbit = S3C2410_CLKCON_USBD,
280+
}, {
281+
.name = "timers",
282+
.id = -1,
283+
.parent = &clk_p,
284+
.enable = s3c24xx_clkcon_enable,
285+
.ctrlbit = S3C2410_CLKCON_PWMT,
286+
}, {
287+
.name = "sdi",
288+
.id = -1,
289+
.parent = &clk_p,
290+
.enable = s3c24xx_clkcon_enable,
291+
.ctrlbit = S3C2410_CLKCON_SDI,
292+
}, {
293+
.name = "uart",
294+
.id = 0,
295+
.parent = &clk_p,
296+
.enable = s3c24xx_clkcon_enable,
297+
.ctrlbit = S3C2410_CLKCON_UART0,
298+
}, {
299+
.name = "uart",
300+
.id = 1,
301+
.parent = &clk_p,
302+
.enable = s3c24xx_clkcon_enable,
303+
.ctrlbit = S3C2410_CLKCON_UART1,
304+
}, {
305+
.name = "uart",
306+
.id = 2,
307+
.parent = &clk_p,
308+
.enable = s3c24xx_clkcon_enable,
309+
.ctrlbit = S3C2410_CLKCON_UART2,
310+
}, {
311+
.name = "gpio",
312+
.id = -1,
313+
.parent = &clk_p,
314+
.enable = s3c24xx_clkcon_enable,
315+
.ctrlbit = S3C2410_CLKCON_GPIO,
316+
}, {
317+
.name = "rtc",
318+
.id = -1,
319+
.parent = &clk_p,
320+
.enable = s3c24xx_clkcon_enable,
321+
.ctrlbit = S3C2410_CLKCON_RTC,
322+
}, {
323+
.name = "adc",
324+
.id = -1,
325+
.parent = &clk_p,
326+
.enable = s3c24xx_clkcon_enable,
327+
.ctrlbit = S3C2410_CLKCON_ADC,
328+
}, {
329+
.name = "i2c",
330+
.id = -1,
331+
.parent = &clk_p,
332+
.enable = s3c24xx_clkcon_enable,
333+
.ctrlbit = S3C2410_CLKCON_IIC,
334+
}, {
335+
.name = "iis",
336+
.id = -1,
337+
.parent = &clk_p,
338+
.enable = s3c24xx_clkcon_enable,
339+
.ctrlbit = S3C2410_CLKCON_IIS,
340+
}, {
341+
.name = "spi",
342+
.id = -1,
343+
.parent = &clk_p,
344+
.enable = s3c24xx_clkcon_enable,
345+
.ctrlbit = S3C2410_CLKCON_SPI,
346+
}, {
347+
.name = "watchdog",
348+
.id = -1,
349+
.parent = &clk_p,
350+
.ctrlbit = 0,
350351
}
351352
};
352353

@@ -390,16 +391,15 @@ int __init s3c24xx_setup_clocks(unsigned long xtal,
390391
clk_p.rate = pclk;
391392
clk_f.rate = fclk;
392393

393-
/* it looks like just setting the register here is not good
394-
* enough, and causes the odd hang at initial boot time, so
395-
* do all of them indivdually.
394+
/* We must be careful disabling the clocks we are not intending to
395+
* be using at boot time, as subsytems such as the LCD which do
396+
* their own DMA requests to the bus can cause the system to lockup
397+
* if they where in the middle of requesting bus access.
396398
*
397-
* I think disabling the LCD clock if the LCD is active is
398-
* very dangerous, and therefore the bootloader should be
399-
* careful to not enable the LCD clock if it is not needed.
400-
*
401-
* and of course, this looks neater
402-
*/
399+
* Disabling the LCD clock if the LCD is active is very dangerous,
400+
* and therefore the bootloader should be careful to not enable
401+
* the LCD clock if it is not needed.
402+
*/
403403

404404
s3c24xx_clk_enable(S3C2410_CLKCON_NAND, 0);
405405
s3c24xx_clk_enable(S3C2410_CLKCON_USBH, 0);

0 commit comments

Comments
 (0)