Commit e7068ad3 authored by Lennert Buytenhek's avatar Lennert Buytenhek Committed by Lennert Buytenhek

[ARM] Orion: fix various whitespace and coding style issues

More cosmetic cleanup:
- Replace 8-space indents by proper tab indents.
- In structure initialisers, use a trailing comma for every member.
- Collapse "},\n{" in structure initialiers to "}, {".
Signed-off-by: default avatarLennert Buytenhek <buytenh@marvell.com>
Acked-by: default avatarRussell King <linux@arm.linux.org.uk>
parent f91a8dcc
...@@ -39,25 +39,22 @@ static struct map_desc orion5x_io_desc[] __initdata = { ...@@ -39,25 +39,22 @@ static struct map_desc orion5x_io_desc[] __initdata = {
.virtual = ORION5X_REGS_VIRT_BASE, .virtual = ORION5X_REGS_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE), .pfn = __phys_to_pfn(ORION5X_REGS_PHYS_BASE),
.length = ORION5X_REGS_SIZE, .length = ORION5X_REGS_SIZE,
.type = MT_DEVICE .type = MT_DEVICE,
}, }, {
{
.virtual = ORION5X_PCIE_IO_VIRT_BASE, .virtual = ORION5X_PCIE_IO_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE), .pfn = __phys_to_pfn(ORION5X_PCIE_IO_PHYS_BASE),
.length = ORION5X_PCIE_IO_SIZE, .length = ORION5X_PCIE_IO_SIZE,
.type = MT_DEVICE .type = MT_DEVICE,
}, }, {
{
.virtual = ORION5X_PCI_IO_VIRT_BASE, .virtual = ORION5X_PCI_IO_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE), .pfn = __phys_to_pfn(ORION5X_PCI_IO_PHYS_BASE),
.length = ORION5X_PCI_IO_SIZE, .length = ORION5X_PCI_IO_SIZE,
.type = MT_DEVICE .type = MT_DEVICE,
}, }, {
{
.virtual = ORION5X_PCIE_WA_VIRT_BASE, .virtual = ORION5X_PCIE_WA_VIRT_BASE,
.pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE), .pfn = __phys_to_pfn(ORION5X_PCIE_WA_PHYS_BASE),
.length = ORION5X_PCIE_WA_SIZE, .length = ORION5X_PCIE_WA_SIZE,
.type = MT_DEVICE .type = MT_DEVICE,
}, },
}; };
...@@ -75,18 +72,15 @@ static struct resource orion5x_uart_resources[] = { ...@@ -75,18 +72,15 @@ static struct resource orion5x_uart_resources[] = {
.start = UART0_PHYS_BASE, .start = UART0_PHYS_BASE,
.end = UART0_PHYS_BASE + 0xff, .end = UART0_PHYS_BASE + 0xff,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, }, {
{
.start = IRQ_ORION5X_UART0, .start = IRQ_ORION5X_UART0,
.end = IRQ_ORION5X_UART0, .end = IRQ_ORION5X_UART0,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
}, }, {
{
.start = UART1_PHYS_BASE, .start = UART1_PHYS_BASE,
.end = UART1_PHYS_BASE + 0xff, .end = UART1_PHYS_BASE + 0xff,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, }, {
{
.start = IRQ_ORION5X_UART1, .start = IRQ_ORION5X_UART1,
.end = IRQ_ORION5X_UART1, .end = IRQ_ORION5X_UART1,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -102,8 +96,7 @@ static struct plat_serial8250_port orion5x_uart_data[] = { ...@@ -102,8 +96,7 @@ static struct plat_serial8250_port orion5x_uart_data[] = {
.iotype = UPIO_MEM, .iotype = UPIO_MEM,
.regshift = 2, .regshift = 2,
.uartclk = ORION5X_TCLK, .uartclk = ORION5X_TCLK,
}, }, {
{
.mapbase = UART1_PHYS_BASE, .mapbase = UART1_PHYS_BASE,
.membase = (char *)UART1_VIRT_BASE, .membase = (char *)UART1_VIRT_BASE,
.irq = IRQ_ORION5X_UART1, .irq = IRQ_ORION5X_UART1,
...@@ -111,8 +104,8 @@ static struct plat_serial8250_port orion5x_uart_data[] = { ...@@ -111,8 +104,8 @@ static struct plat_serial8250_port orion5x_uart_data[] = {
.iotype = UPIO_MEM, .iotype = UPIO_MEM,
.regshift = 2, .regshift = 2,
.uartclk = ORION5X_TCLK, .uartclk = ORION5X_TCLK,
}, {
}, },
{ },
}; };
static struct platform_device orion5x_uart = { static struct platform_device orion5x_uart = {
...@@ -134,8 +127,7 @@ static struct resource orion5x_ehci0_resources[] = { ...@@ -134,8 +127,7 @@ static struct resource orion5x_ehci0_resources[] = {
.start = ORION5X_USB0_PHYS_BASE, .start = ORION5X_USB0_PHYS_BASE,
.end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1, .end = ORION5X_USB0_PHYS_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, }, {
{
.start = IRQ_ORION5X_USB0_CTRL, .start = IRQ_ORION5X_USB0_CTRL,
.end = IRQ_ORION5X_USB0_CTRL, .end = IRQ_ORION5X_USB0_CTRL,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -147,8 +139,7 @@ static struct resource orion5x_ehci1_resources[] = { ...@@ -147,8 +139,7 @@ static struct resource orion5x_ehci1_resources[] = {
.start = ORION5X_USB1_PHYS_BASE, .start = ORION5X_USB1_PHYS_BASE,
.end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1, .end = ORION5X_USB1_PHYS_BASE + SZ_4K - 1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, }, {
{
.start = IRQ_ORION5X_USB1_CTRL, .start = IRQ_ORION5X_USB1_CTRL,
.end = IRQ_ORION5X_USB1_CTRL, .end = IRQ_ORION5X_USB1_CTRL,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
...@@ -219,7 +210,7 @@ static struct resource orion5x_eth_resources[] = { ...@@ -219,7 +210,7 @@ static struct resource orion5x_eth_resources[] = {
.start = IRQ_ORION5X_ETH_SUM, .start = IRQ_ORION5X_ETH_SUM,
.end = IRQ_ORION5X_ETH_SUM, .end = IRQ_ORION5X_ETH_SUM,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_IRQ,
} },
}; };
static struct platform_device orion5x_eth = { static struct platform_device orion5x_eth = {
...@@ -251,16 +242,15 @@ static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = { ...@@ -251,16 +242,15 @@ static struct mv64xxx_i2c_pdata orion5x_i2c_pdata = {
static struct resource orion5x_i2c_resources[] = { static struct resource orion5x_i2c_resources[] = {
{ {
.name = "i2c base", .name = "i2c base",
.start = I2C_PHYS_BASE, .start = I2C_PHYS_BASE,
.end = I2C_PHYS_BASE + 0x20 -1, .end = I2C_PHYS_BASE + 0x20 -1,
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
}, }, {
{ .name = "i2c irq",
.name = "i2c irq", .start = IRQ_ORION5X_I2C,
.start = IRQ_ORION5X_I2C, .end = IRQ_ORION5X_I2C,
.end = IRQ_ORION5X_I2C, .flags = IORESOURCE_IRQ,
.flags = IORESOURCE_IRQ,
}, },
}; };
...@@ -270,7 +260,7 @@ static struct platform_device orion5x_i2c = { ...@@ -270,7 +260,7 @@ static struct platform_device orion5x_i2c = {
.num_resources = ARRAY_SIZE(orion5x_i2c_resources), .num_resources = ARRAY_SIZE(orion5x_i2c_resources),
.resource = orion5x_i2c_resources, .resource = orion5x_i2c_resources,
.dev = { .dev = {
.platform_data = &orion5x_i2c_pdata, .platform_data = &orion5x_i2c_pdata,
}, },
}; };
...@@ -278,28 +268,27 @@ static struct platform_device orion5x_i2c = { ...@@ -278,28 +268,27 @@ static struct platform_device orion5x_i2c = {
* Sata port * Sata port
****************************************************************************/ ****************************************************************************/
static struct resource orion5x_sata_resources[] = { static struct resource orion5x_sata_resources[] = {
{
.name = "sata base",
.start = ORION5X_SATA_PHYS_BASE,
.end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
.flags = IORESOURCE_MEM,
},
{ {
.name = "sata irq", .name = "sata base",
.start = IRQ_ORION5X_SATA, .start = ORION5X_SATA_PHYS_BASE,
.end = IRQ_ORION5X_SATA, .end = ORION5X_SATA_PHYS_BASE + 0x5000 - 1,
.flags = IORESOURCE_IRQ, .flags = IORESOURCE_MEM,
}, }, {
.name = "sata irq",
.start = IRQ_ORION5X_SATA,
.end = IRQ_ORION5X_SATA,
.flags = IORESOURCE_IRQ,
},
}; };
static struct platform_device orion5x_sata = { static struct platform_device orion5x_sata = {
.name = "sata_mv", .name = "sata_mv",
.id = 0, .id = 0,
.dev = { .dev = {
.coherent_dma_mask = 0xffffffff, .coherent_dma_mask = 0xffffffff,
}, },
.num_resources = ARRAY_SIZE(orion5x_sata_resources), .num_resources = ARRAY_SIZE(orion5x_sata_resources),
.resource = orion5x_sata_resources, .resource = orion5x_sata_resources,
}; };
void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data) void __init orion5x_sata_init(struct mv_sata_platform_data *sata_data)
...@@ -319,7 +308,7 @@ static void orion5x_timer_init(void) ...@@ -319,7 +308,7 @@ static void orion5x_timer_init(void)
} }
struct sys_timer orion5x_timer = { struct sys_timer orion5x_timer = {
.init = orion5x_timer_init, .init = orion5x_timer_init,
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -86,7 +86,7 @@ static struct platform_device db88f5281_boot_flash = { ...@@ -86,7 +86,7 @@ static struct platform_device db88f5281_boot_flash = {
.name = "physmap-flash", .name = "physmap-flash",
.id = 0, .id = 0,
.dev = { .dev = {
.platform_data = &db88f5281_boot_flash_data, .platform_data = &db88f5281_boot_flash_data,
}, },
.num_resources = 1, .num_resources = 1,
.resource = &db88f5281_boot_flash_resource, .resource = &db88f5281_boot_flash_resource,
...@@ -110,7 +110,7 @@ static struct platform_device db88f5281_nor_flash = { ...@@ -110,7 +110,7 @@ static struct platform_device db88f5281_nor_flash = {
.name = "physmap-flash", .name = "physmap-flash",
.id = 1, .id = 1,
.dev = { .dev = {
.platform_data = &db88f5281_nor_flash_data, .platform_data = &db88f5281_nor_flash_data,
}, },
.num_resources = 1, .num_resources = 1,
.resource = &db88f5281_nor_flash_resource, .resource = &db88f5281_nor_flash_resource,
...@@ -125,18 +125,15 @@ static struct mtd_partition db88f5281_nand_parts[] = { ...@@ -125,18 +125,15 @@ static struct mtd_partition db88f5281_nand_parts[] = {
.name = "kernel", .name = "kernel",
.offset = 0, .offset = 0,
.size = SZ_2M, .size = SZ_2M,
}, }, {
{
.name = "root", .name = "root",
.offset = SZ_2M, .offset = SZ_2M,
.size = (SZ_16M - SZ_2M), .size = (SZ_16M - SZ_2M),
}, }, {
{
.name = "user", .name = "user",
.offset = SZ_16M, .offset = SZ_16M,
.size = SZ_8M, .size = SZ_8M,
}, }, {
{
.name = "recovery", .name = "recovery",
.offset = (SZ_16M + SZ_8M), .offset = (SZ_16M + SZ_8M),
.size = SZ_8M, .size = SZ_8M,
......
...@@ -119,7 +119,7 @@ static struct mtd_partition dns323_partitions[] = { ...@@ -119,7 +119,7 @@ static struct mtd_partition dns323_partitions[] = {
.name = "u-boot", .name = "u-boot",
.size = 0x00030000, .size = 0x00030000,
.offset = 0x007d0000, .offset = 0x007d0000,
} },
}; };
static struct physmap_flash_data dns323_nor_flash_data = { static struct physmap_flash_data dns323_nor_flash_data = {
...@@ -137,7 +137,9 @@ static struct resource dns323_nor_flash_resource = { ...@@ -137,7 +137,9 @@ static struct resource dns323_nor_flash_resource = {
static struct platform_device dns323_nor_flash = { static struct platform_device dns323_nor_flash = {
.name = "physmap-flash", .name = "physmap-flash",
.id = 0, .id = 0,
.dev = { .platform_data = &dns323_nor_flash_data, }, .dev = {
.platform_data = &dns323_nor_flash_data,
},
.resource = &dns323_nor_flash_resource, .resource = &dns323_nor_flash_resource,
.num_resources = 1, .num_resources = 1,
}; };
...@@ -170,7 +172,9 @@ static struct gpio_led_platform_data dns323_led_data = { ...@@ -170,7 +172,9 @@ static struct gpio_led_platform_data dns323_led_data = {
static struct platform_device dns323_gpio_leds = { static struct platform_device dns323_gpio_leds = {
.name = "leds-gpio", .name = "leds-gpio",
.id = -1, .id = -1,
.dev = { .platform_data = &dns323_led_data, }, .dev = {
.platform_data = &dns323_led_data,
},
}; };
/**************************************************************************** /****************************************************************************
...@@ -183,25 +187,26 @@ static struct gpio_keys_button dns323_buttons[] = { ...@@ -183,25 +187,26 @@ static struct gpio_keys_button dns323_buttons[] = {
.gpio = DNS323_GPIO_KEY_RESET, .gpio = DNS323_GPIO_KEY_RESET,
.desc = "Reset Button", .desc = "Reset Button",
.active_low = 1, .active_low = 1,
}, }, {
{
.code = KEY_POWER, .code = KEY_POWER,
.gpio = DNS323_GPIO_KEY_POWER, .gpio = DNS323_GPIO_KEY_POWER,
.desc = "Power Button", .desc = "Power Button",
.active_low = 1, .active_low = 1,
} },
}; };
static struct gpio_keys_platform_data dns323_button_data = { static struct gpio_keys_platform_data dns323_button_data = {
.buttons = dns323_buttons, .buttons = dns323_buttons,
.nbuttons = ARRAY_SIZE(dns323_buttons), .nbuttons = ARRAY_SIZE(dns323_buttons),
}; };
static struct platform_device dns323_button_device = { static struct platform_device dns323_button_device = {
.name = "gpio-keys", .name = "gpio-keys",
.id = -1, .id = -1,
.num_resources = 0, .num_resources = 0,
.dev = { .platform_data = &dns323_button_data, }, .dev = {
.platform_data = &dns323_button_data,
},
}; };
/**************************************************************************** /****************************************************************************
...@@ -225,17 +230,15 @@ static struct platform_device *dns323_plat_devices[] __initdata = { ...@@ -225,17 +230,15 @@ static struct platform_device *dns323_plat_devices[] __initdata = {
static struct i2c_board_info __initdata dns323_i2c_devices[] = { static struct i2c_board_info __initdata dns323_i2c_devices[] = {
{ {
I2C_BOARD_INFO("g760a", 0x3e), I2C_BOARD_INFO("g760a", 0x3e),
},
#if 0 #if 0
/* this entry requires the new-style driver model lm75 driver, /* this entry requires the new-style driver model lm75 driver,
* for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */ * for the meantime "insmod lm75.ko force_lm75=0,0x48" is needed */
{ }, {
I2C_BOARD_INFO("g751", 0x48), I2C_BOARD_INFO("g751", 0x48),
},
#endif #endif
{ }, {
I2C_BOARD_INFO("m41t80", 0x68), I2C_BOARD_INFO("m41t80", 0x68),
} },
}; };
/* DNS-323 specific power off method */ /* DNS-323 specific power off method */
...@@ -292,8 +295,8 @@ static void __init dns323_init(void) ...@@ -292,8 +295,8 @@ static void __init dns323_init(void)
orion5x_gpio_set_valid_pins(0x07f6); orion5x_gpio_set_valid_pins(0x07f6);
/* register dns323 specific power-off method */ /* register dns323 specific power-off method */
if ((gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0) if (gpio_request(DNS323_GPIO_POWER_OFF, "POWEROFF") != 0 ||
|| (gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)) gpio_direction_output(DNS323_GPIO_POWER_OFF, 0) != 0)
pr_err("DNS323: failed to setup power-off GPIO\n"); pr_err("DNS323: failed to setup power-off GPIO\n");
pm_power_off = dns323_power_off; pm_power_off = dns323_power_off;
......
...@@ -53,13 +53,11 @@ static struct mtd_partition kurobox_pro_nand_parts[] = { ...@@ -53,13 +53,11 @@ static struct mtd_partition kurobox_pro_nand_parts[] = {
.name = "uImage", .name = "uImage",
.offset = 0, .offset = 0,
.size = SZ_4M, .size = SZ_4M,
}, }, {
{
.name = "rootfs", .name = "rootfs",
.offset = SZ_4M, .offset = SZ_4M,
.size = SZ_64M, .size = SZ_64M,
}, }, {
{
.name = "extra", .name = "extra",
.offset = SZ_4M + SZ_64M, .offset = SZ_4M + SZ_64M,
.size = SZ_256M - (SZ_4M + SZ_64M), .size = SZ_256M - (SZ_4M + SZ_64M),
...@@ -175,7 +173,7 @@ static struct i2c_board_info __initdata kurobox_pro_i2c_rtc = { ...@@ -175,7 +173,7 @@ static struct i2c_board_info __initdata kurobox_pro_i2c_rtc = {
* SATA * SATA
****************************************************************************/ ****************************************************************************/
static struct mv_sata_platform_data kurobox_pro_sata_data = { static struct mv_sata_platform_data kurobox_pro_sata_data = {
.n_ports = 2, .n_ports = 2,
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -240,13 +240,13 @@ static int __init pcie_setup(struct pci_sys_data *sys) ...@@ -240,13 +240,13 @@ static int __init pcie_setup(struct pci_sys_data *sys)
* PCI Address Decode Windows registers * PCI Address Decode Windows registers
*/ */
#define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \ #define PCI_BAR_SIZE_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc08) : \
((n) == 1) ? ORION5X_PCI_REG(0xd08) : \ ((n) == 1) ? ORION5X_PCI_REG(0xd08) : \
((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \ ((n) == 2) ? ORION5X_PCI_REG(0xc0c) : \
((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0) ((n) == 3) ? ORION5X_PCI_REG(0xd0c) : 0)
#define PCI_BAR_REMAP_DDR_CS(n) (((n) ==0) ? ORION5X_PCI_REG(0xc48) : \ #define PCI_BAR_REMAP_DDR_CS(n) (((n) == 0) ? ORION5X_PCI_REG(0xc48) : \
((n) == 1) ? ORION5X_PCI_REG(0xd48) : \ ((n) == 1) ? ORION5X_PCI_REG(0xd48) : \
((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \ ((n) == 2) ? ORION5X_PCI_REG(0xc4c) : \
((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0) ((n) == 3) ? ORION5X_PCI_REG(0xd4c) : 0)
#define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c) #define PCI_BAR_ENABLE ORION5X_PCI_REG(0xc3c)
#define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c) #define PCI_ADDR_DECODE_CTRL ORION5X_PCI_REG(0xd3c)
......
...@@ -125,6 +125,7 @@ static int __init rd88f5182_dbgled_init(void) ...@@ -125,6 +125,7 @@ static int __init rd88f5182_dbgled_init(void)
leds_event = rd88f5182_dbgled_event; leds_event = rd88f5182_dbgled_event;
} }
return 0; return 0;
} }
...@@ -234,7 +235,7 @@ static struct i2c_board_info __initdata rd88f5182_i2c_rtc = { ...@@ -234,7 +235,7 @@ static struct i2c_board_info __initdata rd88f5182_i2c_rtc = {
* Sata * Sata
****************************************************************************/ ****************************************************************************/
static struct mv_sata_platform_data rd88f5182_sata_data = { static struct mv_sata_platform_data rd88f5182_sata_data = {
.n_ports = 2, .n_ports = 2,
}; };
/***************************************************************************** /*****************************************************************************
......
...@@ -47,52 +47,54 @@ ...@@ -47,52 +47,54 @@
***************************************************************************/ ***************************************************************************/
static struct mtd_partition qnap_ts209_partitions[] = { static struct mtd_partition qnap_ts209_partitions[] = {
{ {
.name = "U-Boot", .name = "U-Boot",
.size = 0x00080000, .size = 0x00080000,
.offset = 0x00780000, .offset = 0x00780000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
}, { }, {
.name = "Kernel", .name = "Kernel",
.size = 0x00200000, .size = 0x00200000,
.offset = 0, .offset = 0,
}, { }, {
.name = "RootFS1", .name = "RootFS1",
.size = 0x00400000, .size = 0x00400000,
.offset = 0x00200000, .offset = 0x00200000,
}, { }, {
.name = "RootFS2", .name = "RootFS2",
.size = 0x00100000, .size = 0x00100000,
.offset = 0x00600000, .offset = 0x00600000,
}, { }, {
.name = "U-Boot Config", .name = "U-Boot Config",
.size = 0x00020000, .size = 0x00020000,
.offset = 0x00760000, .offset = 0x00760000,
}, { }, {
.name = "NAS Config", .name = "NAS Config",
.size = 0x00060000, .size = 0x00060000,
.offset = 0x00700000, .offset = 0x00700000,
.mask_flags = MTD_WRITEABLE, .mask_flags = MTD_WRITEABLE,
} },
}; };
static struct physmap_flash_data qnap_ts209_nor_flash_data = { static struct physmap_flash_data qnap_ts209_nor_flash_data = {
.width = 1, .width = 1,
.parts = qnap_ts209_partitions, .parts = qnap_ts209_partitions,
.nr_parts = ARRAY_SIZE(qnap_ts209_partitions) .nr_parts = ARRAY_SIZE(qnap_ts209_partitions)
}; };
static struct resource qnap_ts209_nor_flash_resource = { static struct resource qnap_ts209_nor_flash_resource = {
.flags = IORESOURCE_MEM, .flags = IORESOURCE_MEM,
.start = QNAP_TS209_NOR_BOOT_BASE, .start = QNAP_TS209_NOR_BOOT_BASE,
.end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1, .end = QNAP_TS209_NOR_BOOT_BASE + QNAP_TS209_NOR_BOOT_SIZE - 1,
}; };
static struct platform_device qnap_ts209_nor_flash = { static struct platform_device qnap_ts209_nor_flash = {
.name = "physmap-flash", .name = "physmap-flash",
.id = 0, .id = 0,
.dev = { .platform_data = &qnap_ts209_nor_flash_data, }, .dev = {
.resource = &qnap_ts209_nor_flash_resource, .platform_data = &qnap_ts209_nor_flash_data,
.num_resources = 1, },
.resource = &qnap_ts209_nor_flash_resource,
.num_resources = 1,
}; };
/***************************************************************************** /*****************************************************************************
...@@ -164,12 +166,12 @@ static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin) ...@@ -164,12 +166,12 @@ static int __init qnap_ts209_pci_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
} }
static struct hw_pci qnap_ts209_pci __initdata = { static struct hw_pci qnap_ts209_pci __initdata = {
.nr_controllers = 2, .nr_controllers = 2,
.preinit = qnap_ts209_pci_preinit, .preinit = qnap_ts209_pci_preinit,
.swizzle = pci_std_swizzle, .swizzle = pci_std_swizzle,
.setup = orion5x_pci_sys_setup, .setup = orion5x_pci_sys_setup,
.scan = orion5x_pci_sys_scan_bus, .scan = orion5x_pci_sys_scan_bus,
.map_irq = qnap_ts209_pci_map_irq, .map_irq = qnap_ts209_pci_map_irq,
}; };
static int __init qnap_ts209_pci_init(void) static int __init qnap_ts209_pci_init(void)
...@@ -187,8 +189,8 @@ subsys_initcall(qnap_ts209_pci_init); ...@@ -187,8 +189,8 @@ subsys_initcall(qnap_ts209_pci_init);
****************************************************************************/ ****************************************************************************/
static struct mv643xx_eth_platform_data qnap_ts209_eth_data = { static struct mv643xx_eth_platform_data qnap_ts209_eth_data = {
.phy_addr = 8, .phy_addr = 8,
.force_phy_addr = 1, .force_phy_addr = 1,
}; };
static int __init parse_hex_nibble(char n) static int __init parse_hex_nibble(char n)
...@@ -280,7 +282,7 @@ static void __init ts209_find_mac_addr(void) ...@@ -280,7 +282,7 @@ static void __init ts209_find_mac_addr(void)
static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = { static struct i2c_board_info __initdata qnap_ts209_i2c_rtc = {
I2C_BOARD_INFO("s35390a", 0x30), I2C_BOARD_INFO("s35390a", 0x30),
.irq = 0, .irq = 0,
}; };
/**************************************************************************** /****************************************************************************
...@@ -297,32 +299,33 @@ static struct gpio_keys_button qnap_ts209_buttons[] = { ...@@ -297,32 +299,33 @@ static struct gpio_keys_button qnap_ts209_buttons[] = {
.gpio = QNAP_TS209_GPIO_KEY_MEDIA, .gpio = QNAP_TS209_GPIO_KEY_MEDIA,
.desc = "USB Copy Button", .desc = "USB Copy Button",
.active_low = 1, .active_low = 1,
}, }, {
{
.code = KEY_POWER, .code = KEY_POWER,
.gpio = QNAP_TS209_GPIO_KEY_RESET, .gpio = QNAP_TS209_GPIO_KEY_RESET,
.desc = "Reset Button", .desc = "Reset Button",
.active_low = 1, .active_low = 1,
} },
}; };
static struct gpio_keys_platform_data qnap_ts209_button_data = { static struct gpio_keys_platform_data qnap_ts209_button_data = {
.buttons = qnap_ts209_buttons, .buttons = qnap_ts209_buttons,
.nbuttons = ARRAY_SIZE(qnap_ts209_buttons), .nbuttons = ARRAY_SIZE(qnap_ts209_buttons),
}; };
static struct platform_device qnap_ts209_button_device = { static struct platform_device qnap_ts209_button_device = {
.name = "gpio-keys", .name = "gpio-keys",
.id = -1, .id = -1,
.num_resources = 0, .num_resources = 0,
.dev = { .platform_data = &qnap_ts209_button_data, }, .dev = {
.platform_data = &qnap_ts209_button_data,
},
}; };
/***************************************************************************** /*****************************************************************************
* SATA * SATA
****************************************************************************/ ****************************************************************************/
static struct mv_sata_platform_data qnap_ts209_sata_data = { static struct mv_sata_platform_data qnap_ts209_sata_data = {
.n_ports = 2, .n_ports = 2,
}; };
/***************************************************************************** /*****************************************************************************
...@@ -339,7 +342,7 @@ static struct platform_device *qnap_ts209_devices[] __initdata = { ...@@ -339,7 +342,7 @@ static struct platform_device *qnap_ts209_devices[] __initdata = {
* QNAP TS-[12]09 specific power off method via UART1-attached PIC * QNAP TS-[12]09 specific power off method via UART1-attached PIC
*/ */
#define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2)) #define UART1_REG(x) (UART1_VIRT_BASE + ((UART_##x) << 2))
static void qnap_ts209_power_off(void) static void qnap_ts209_power_off(void)
{ {
...@@ -372,7 +375,7 @@ static void __init qnap_ts209_init(void) ...@@ -372,7 +375,7 @@ static void __init qnap_ts209_init(void)
* Setup flash mapping * Setup flash mapping
*/ */
orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE, orion5x_setup_dev_boot_win(QNAP_TS209_NOR_BOOT_BASE,
QNAP_TS209_NOR_BOOT_SIZE); QNAP_TS209_NOR_BOOT_SIZE);
/* /*
* Open a special address decode windows for the PCIe WA. * Open a special address decode windows for the PCIe WA.
...@@ -432,7 +435,7 @@ static void __init qnap_ts209_init(void) ...@@ -432,7 +435,7 @@ static void __init qnap_ts209_init(void)
} }
MACHINE_START(TS209, "QNAP TS-109/TS-209") MACHINE_START(TS209, "QNAP TS-109/TS-209")
/* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */ /* Maintainer: Byron Bradley <byron.bbradley@gmail.com> */
.phys_io = ORION5X_REGS_PHYS_BASE, .phys_io = ORION5X_REGS_PHYS_BASE,
.io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC, .io_pg_offst = ((ORION5X_REGS_VIRT_BASE) >> 18) & 0xFFFC,
.boot_params = 0x00000100, .boot_params = 0x00000100,
......
...@@ -423,13 +423,13 @@ cpu_feroceon_name: ...@@ -423,13 +423,13 @@ cpu_feroceon_name:
__feroceon_old_id_proc_info: __feroceon_old_id_proc_info:
.long 0x41069260 .long 0x41069260
.long 0xfffffff0 .long 0xfffffff0
.long PMD_TYPE_SECT | \ .long PMD_TYPE_SECT | \
PMD_SECT_BUFFERABLE | \ PMD_SECT_BUFFERABLE | \
PMD_SECT_CACHEABLE | \ PMD_SECT_CACHEABLE | \
PMD_BIT4 | \ PMD_BIT4 | \
PMD_SECT_AP_WRITE | \ PMD_SECT_AP_WRITE | \
PMD_SECT_AP_READ PMD_SECT_AP_READ
.long PMD_TYPE_SECT | \ .long PMD_TYPE_SECT | \
PMD_BIT4 | \ PMD_BIT4 | \
PMD_SECT_AP_WRITE | \ PMD_SECT_AP_WRITE | \
PMD_SECT_AP_READ PMD_SECT_AP_READ
...@@ -449,13 +449,13 @@ __feroceon_old_id_proc_info: ...@@ -449,13 +449,13 @@ __feroceon_old_id_proc_info:
__feroceon_proc_info: __feroceon_proc_info:
.long 0x56055310 .long 0x56055310
.long 0xfffffff0 .long 0xfffffff0
.long PMD_TYPE_SECT | \ .long PMD_TYPE_SECT | \
PMD_SECT_BUFFERABLE | \ PMD_SECT_BUFFERABLE | \
PMD_SECT_CACHEABLE | \ PMD_SECT_CACHEABLE | \
PMD_BIT4 | \ PMD_BIT4 | \
PMD_SECT_AP_WRITE | \ PMD_SECT_AP_WRITE | \
PMD_SECT_AP_READ PMD_SECT_AP_READ
.long PMD_TYPE_SECT | \ .long PMD_TYPE_SECT | \
PMD_BIT4 | \ PMD_BIT4 | \
PMD_SECT_AP_WRITE | \ PMD_SECT_AP_WRITE | \
PMD_SECT_AP_READ PMD_SECT_AP_READ
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment