2 - Replace 8-space indents by proper tab indents.
3 - In structure initialisers, use a trailing comma for every member.
4 - Collapse "},\n{" in structure initialiers to "}, {".
6 Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
8 arch/arm/mach-orion5x/common.c | 91 +++++++++++--------------
9 arch/arm/mach-orion5x/db88f5281-setup.c | 13 ++--
10 arch/arm/mach-orion5x/dns323-setup.c | 33 +++++----
11 arch/arm/mach-orion5x/kurobox_pro-setup.c | 8 +--
12 arch/arm/mach-orion5x/pci.c | 14 ++--
13 arch/arm/mach-orion5x/rd88f5182-setup.c | 3 +-
14 arch/arm/mach-orion5x/ts209-setup.c | 103 +++++++++++++++--------------
15 arch/arm/mm/proc-feroceon.S | 8 +-
16 8 files changed, 132 insertions(+), 141 deletions(-)
18 --- a/arch/arm/mach-orion5x/common.c
19 +++ b/arch/arm/mach-orion5x/common.c
21 .virtual = ORION5X_REGS_VIRT_BASE,
22 .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
23 .length = ORION5X_REGS_SIZE,
29 .virtual = ORION5X_PCIE_IO_VIRT_BASE,
30 .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
31 .length = ORION5X_PCIE_IO_SIZE,
37 .virtual = ORION5X_PCI_IO_VIRT_BASE,
38 .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
39 .length = ORION5X_PCI_IO_SIZE,
45 .virtual = ORION5X_PCIE_WA_VIRT_BASE,
46 .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
47 .length = ORION5X_PCIE_WA_SIZE,
54 .start = UART0_PHYS_BASE,
55 .end = UART0_PHYS_BASE + 0xff,
56 .flags = IORESOURCE_MEM,
60 .start = IRQ_ORION5X_UART0,
61 .end = IRQ_ORION5X_UART0,
62 .flags = IORESOURCE_IRQ,
66 .start = UART1_PHYS_BASE,
67 .end = UART1_PHYS_BASE + 0xff,
68 .flags = IORESOURCE_MEM,
72 .start = IRQ_ORION5X_UART1,
73 .end = IRQ_ORION5X_UART1,
74 .flags = IORESOURCE_IRQ,
78 .uartclk = ORION5X_TCLK,
82 .mapbase = UART1_PHYS_BASE,
83 .membase = (char *)UART1_VIRT_BASE,
84 .irq = IRQ_ORION5X_UART1,
88 .uartclk = ORION5X_TCLK,
94 static struct platform_device orion5x_uart = {
96 .start = ORION5X_USB0_PHYS_BASE,
97 .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
98 .flags = IORESOURCE_MEM,
102 .start = IRQ_ORION5X_USB0_CTRL,
103 .end = IRQ_ORION5X_USB0_CTRL,
104 .flags = IORESOURCE_IRQ,
106 .start = ORION5X_USB1_PHYS_BASE,
107 .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
108 .flags = IORESOURCE_MEM,
112 .start = IRQ_ORION5X_USB1_CTRL,
113 .end = IRQ_ORION5X_USB1_CTRL,
114 .flags = IORESOURCE_IRQ,
116 .start = IRQ_ORION5X_ETH_SUM,
117 .end = IRQ_ORION5X_ETH_SUM,
118 .flags = IORESOURCE_IRQ,
123 static struct platform_device orion5x_eth = {
124 @@ -251,16 +242,15 @@
126 static struct resource orion5x_i2c_resources[] = {
128 - .name = "i2c base",
129 - .start = I2C_PHYS_BASE,
130 - .end = I2C_PHYS_BASE + 0x20 -1,
131 - .flags = IORESOURCE_MEM,
135 - .start = IRQ_ORION5X_I2C,
136 - .end = IRQ_ORION5X_I2C,
137 - .flags = IORESOURCE_IRQ,
138 + .name = "i2c base",
139 + .start = I2C_PHYS_BASE,
140 + .end = I2C_PHYS_BASE + 0x20 -1,
141 + .flags = IORESOURCE_MEM,
144 + .start = IRQ_ORION5X_I2C,
145 + .end = IRQ_ORION5X_I2C,
146 + .flags = IORESOURCE_IRQ,
151 .num_resources = ARRAY_SIZE(orion5x_i2c_resources),
152 .resource = orion5x_i2c_resources,
154 - .platform_data = &orion5x_i2c_pdata,
155 + .platform_data = &orion5x_i2c_pdata,
159 @@ -278,28 +268,27 @@
161 ****************************************************************************/
162 static struct resource orion5x_sata_resources[] = {
164 - .name = "sata base",
165 - .start = ORION5X_SATA_PHYS_BASE,
166 - .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
167 - .flags = IORESOURCE_MEM,
170 - .name = "sata irq",
171 - .start = IRQ_ORION5X_SATA,
172 - .end = IRQ_ORION5X_SATA,
173 - .flags = IORESOURCE_IRQ,
175 + .name = "sata base",
176 + .start = ORION5X_SATA_PHYS_BASE,
177 + .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
178 + .flags = IORESOURCE_MEM,
180 + .name = "sata irq",
181 + .start = IRQ_ORION5X_SATA,
182 + .end = IRQ_ORION5X_SATA,
183 + .flags = IORESOURCE_IRQ,
187 static struct platform_device orion5x_sata = {
193 .coherent_dma_mask = 0xffffffff,
195 - .num_resources = ARRAY_SIZE(orion5x_sata_resources),
196 - .resource = orion5x_sata_resources,
197 + .num_resources = ARRAY_SIZE(orion5x_sata_resources),
198 + .resource = orion5x_sata_resources,
201 void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
205 struct sys_timer orion5x_timer = {
206 - .init = orion5x_timer_init,
207 + .init = orion5x_timer_init,
210 /*****************************************************************************
211 --- a/arch/arm/mach-orion5x/db88f5281-setup.c
212 +++ b/arch/arm/mach-orion5x/db88f5281-setup.c
214 .name = "physmap-flash",
217 - .platform_data = &db88f5281_boot_flash_data,
218 + .platform_data = &db88f5281_boot_flash_data,
221 .resource = &db88f5281_boot_flash_resource,
223 .name = "physmap-flash",
226 - .platform_data = &db88f5281_nor_flash_data,
227 + .platform_data = &db88f5281_nor_flash_data,
230 .resource = &db88f5281_nor_flash_resource,
231 @@ -125,18 +125,15 @@
240 .size = (SZ_16M - SZ_2M),
251 .offset = (SZ_16M + SZ_8M),
253 --- a/arch/arm/mach-orion5x/dns323-setup.c
254 +++ b/arch/arm/mach-orion5x/dns323-setup.c
258 .offset = 0x007d0000,
263 static struct physmap_flash_data dns323_nor_flash_data = {
265 static struct platform_device dns323_nor_flash = {
266 .name = "physmap-flash",
268 - .dev = { .platform_data = &dns323_nor_flash_data, },
270 + .platform_data = &dns323_nor_flash_data,
272 .resource = &dns323_nor_flash_resource,
276 static struct platform_device dns323_gpio_leds = {
279 - .dev = { .platform_data = &dns323_led_data, },
281 + .platform_data = &dns323_led_data,
285 /****************************************************************************
286 @@ -183,25 +187,26 @@
287 .gpio = DNS323_GPIO_KEY_RESET,
288 .desc = "Reset Button",
294 .gpio = DNS323_GPIO_KEY_POWER,
295 .desc = "Power Button",
301 static struct gpio_keys_platform_data dns323_button_data = {
302 .buttons = dns323_buttons,
303 - .nbuttons = ARRAY_SIZE(dns323_buttons),
304 + .nbuttons = ARRAY_SIZE(dns323_buttons),
307 static struct platform_device dns323_button_device = {
311 - .dev = { .platform_data = &dns323_button_data, },
313 + .platform_data = &dns323_button_data,
317 /****************************************************************************
318 @@ -225,17 +230,15 @@
319 static struct i2c_board_info __initdata dns323_i2c_devices[] = {
321 I2C_BOARD_INFO("g760a", 0x3e),
324 /* this entry requires the new-style driver model lm75 driver,
325 * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
328 I2C_BOARD_INFO("g751", 0x48),
333 I2C_BOARD_INFO("m41t80", 0x68),
338 /* DNS-323 specific power off method */
340 orion5x_gpio_set_valid_pins(0x07f6);
342 /* register dns323 specific power-off method */
343 - if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0)
344 - || (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0))
345 + if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
346 + gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
347 pr_err("DNS323: failed to setup power-off GPIO\n");
349 pm_power_off = dns323_power_off;
350 --- a/arch/arm/mach-orion5x/kurobox_pro-setup.c
351 +++ b/arch/arm/mach-orion5x/kurobox_pro-setup.c
366 .offset = SZ_4M + SZ_64M,
367 .size = SZ_256M - (SZ_4M + SZ_64M),
370 ****************************************************************************/
371 static struct mv_sata_platform_data kurobox_pro_sata_data = {
376 /*****************************************************************************
377 --- a/arch/arm/mach-orion5x/pci.c
378 +++ b/arch/arm/mach-orion5x/pci.c
379 @@ -240,13 +240,13 @@
380 * PCI Address Decode Windows registers
382 #define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
383 - ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
384 - ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
385 - ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
386 -#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION5X_PCI_REG(0xc48) : \
387 - ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
388 - ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
389 - ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
390 + ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
391 + ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
392 + ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
393 +#define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \
394 + ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
395 + ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
396 + ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
397 #define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
398 #define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)
400 --- a/arch/arm/mach-orion5x/rd88f5182-setup.c
401 +++ b/arch/arm/mach-orion5x/rd88f5182-setup.c
404 leds_event = rd88f5182_dbgled_event;
412 ****************************************************************************/
413 static struct mv_sata_platform_data rd88f5182_sata_data = {
418 /*****************************************************************************
419 --- a/arch/arm/mach-orion5x/ts209-setup.c
420 +++ b/arch/arm/mach-orion5x/ts209-setup.c
422 ***************************************************************************/
423 static struct mtd_partition qnap_ts209_partitions[] = {
426 - .size = 0x00080000,
427 - .offset = 0x00780000,
428 - .mask_flags = MTD_WRITEABLE,
430 + .size = 0x00080000,
431 + .offset = 0x00780000,
432 + .mask_flags = MTD_WRITEABLE,
435 - .size = 0x00200000,
438 + .size = 0x00200000,
442 - .size = 0x00400000,
443 - .offset = 0x00200000,
445 + .size = 0x00400000,
446 + .offset = 0x00200000,
449 - .size = 0x00100000,
450 - .offset = 0x00600000,
452 + .size = 0x00100000,
453 + .offset = 0x00600000,
455 - .name = "U-Boot Config",
456 - .size = 0x00020000,
457 - .offset = 0x00760000,
458 + .name = "U-Boot Config",
459 + .size = 0x00020000,
460 + .offset = 0x00760000,
462 - .name = "NAS Config",
463 - .size = 0x00060000,
464 - .offset = 0x00700000,
465 - .mask_flags = MTD_WRITEABLE,
467 + .name = "NAS Config",
468 + .size = 0x00060000,
469 + .offset = 0x00700000,
470 + .mask_flags = MTD_WRITEABLE,
474 static struct physmap_flash_data qnap_ts209_nor_flash_data = {
476 - .parts = qnap_ts209_partitions,
477 - .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
479 + .parts = qnap_ts209_partitions,
480 + .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
483 static struct resource qnap_ts209_nor_flash_resource = {
484 - .flags = IORESOURCE_MEM,
485 - .start = QNAP_TS209_NOR_BOOT_BASE,
486 - .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
487 + .flags = IORESOURCE_MEM,
488 + .start = QNAP_TS209_NOR_BOOT_BASE,
489 + .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
492 static struct platform_device qnap_ts209_nor_flash = {
493 - .name = "physmap-flash",
495 - .dev = { .platform_data = &qnap_ts209_nor_flash_data, },
496 - .resource = &qnap_ts209_nor_flash_resource,
497 - .num_resources = 1,
498 + .name = "physmap-flash",
501 + .platform_data = &qnap_ts209_nor_flash_data,
503 + .resource = &qnap_ts209_nor_flash_resource,
504 + .num_resources = 1,
507 /*****************************************************************************
508 @@ -164,12 +166,12 @@
511 static struct hw_pci qnap_ts209_pci __initdata = {
512 - .nr_controllers = 2,
513 - .preinit = qnap_ts209_pci_preinit,
514 - .swizzle = pci_std_swizzle,
515 - .setup = orion5x_pci_sys_setup,
516 - .scan = orion5x_pci_sys_scan_bus,
517 - .map_irq = qnap_ts209_pci_map_irq,
518 + .nr_controllers = 2,
519 + .preinit = qnap_ts209_pci_preinit,
520 + .swizzle = pci_std_swizzle,
521 + .setup = orion5x_pci_sys_setup,
522 + .scan = orion5x_pci_sys_scan_bus,
523 + .map_irq = qnap_ts209_pci_map_irq,
526 static int __init qnap_ts209_pci_init(void)
528 ****************************************************************************/
530 static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
532 - .force_phy_addr = 1,
534 + .force_phy_addr = 1,
537 static int __init parse_hex_nibble(char n)
540 static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
541 I2C_BOARD_INFO("s35390a", 0x30),
546 /****************************************************************************
547 @@ -297,32 +299,33 @@
548 .gpio = QNAP_TS209_GPIO_KEY_MEDIA,
549 .desc = "USB Copy Button",
555 .gpio = QNAP_TS209_GPIO_KEY_RESET,
556 .desc = "Reset Button",
562 static struct gpio_keys_platform_data qnap_ts209_button_data = {
563 .buttons = qnap_ts209_buttons,
564 - .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
565 + .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
568 static struct platform_device qnap_ts209_button_device = {
572 - .dev = { .platform_data = &qnap_ts209_button_data, },
574 + .platform_data = &qnap_ts209_button_data,
578 /*****************************************************************************
580 ****************************************************************************/
581 static struct mv_sata_platform_data qnap_ts209_sata_data = {
586 /*****************************************************************************
588 * QNAP TS-[12]09 specific power off method via UART1-attached PIC
591 -#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
592 +#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
594 static void qnap_ts209_power_off(void)
597 * Setup flash mapping
599 orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
600 - QNAP_TS209_NOR_BOOT_SIZE);
601 + QNAP_TS209_NOR_BOOT_SIZE);
604 * Open a special address decode windows for the PCIe WA.
608 MACHINE_START(TS209, "QNAP TS-109/TS-209")
609 - /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
610 + /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
611 .phys_io = ORION5X_REGS_PHYS_BASE,
612 .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
613 .boot_params = 0x00000100,
614 --- a/arch/arm/mm/proc-feroceon.S
615 +++ b/arch/arm/mm/proc-feroceon.S
616 @@ -454,13 +454,13 @@
617 __feroceon_old_id_proc_info:
620 - .long PMD_TYPE_SECT | \
621 + .long PMD_TYPE_SECT | \
622 PMD_SECT_BUFFERABLE | \
623 PMD_SECT_CACHEABLE | \
625 PMD_SECT_AP_WRITE | \
627 - .long PMD_TYPE_SECT | \
628 + .long PMD_TYPE_SECT | \
630 PMD_SECT_AP_WRITE | \
632 @@ -480,13 +480,13 @@
633 __feroceon_proc_info:
636 - .long PMD_TYPE_SECT | \
637 + .long PMD_TYPE_SECT | \
638 PMD_SECT_BUFFERABLE | \
639 PMD_SECT_CACHEABLE | \
641 PMD_SECT_AP_WRITE | \
643 - .long PMD_TYPE_SECT | \
644 + .long PMD_TYPE_SECT | \
646 PMD_SECT_AP_WRITE | \