static int ap91_pci_plat_dev_init(struct pci_dev *dev)
{
- switch(PCI_SLOT(dev->devfn)) {
+ switch (PCI_SLOT(dev->devfn)) {
case 0:
dev->dev.platform_data = &ap91_wmac_data;
break;
static char ap94_wmac1_mac[6];
static struct ar71xx_pci_irq ap94_pci_irqs[] __initdata = {
- {
- .slot = 0,
- .pin = 1,
- .irq = AR71XX_PCI_IRQ_DEV0,
- }, {
- .slot = 1,
- .pin = 1,
- .irq = AR71XX_PCI_IRQ_DEV1,
- }
+ {
+ .slot = 0,
+ .pin = 1,
+ .irq = AR71XX_PCI_IRQ_DEV0,
+ }, {
+ .slot = 1,
+ .pin = 1,
+ .irq = AR71XX_PCI_IRQ_DEV1,
+ }
};
static int ap94_pci_plat_dev_init(struct pci_dev *dev)
{
- switch(PCI_SLOT(dev->devfn)) {
+ switch (PCI_SLOT(dev->devfn)) {
case 17:
dev->dev.platform_data = &ap94_wmac0_data;
break;
void __init arch_init_irq(void)
{
- switch(ar71xx_soc) {
+ switch (ar71xx_soc) {
case AR71XX_SOC_AR7240:
case AR71XX_SOC_AR7241:
case AR71XX_SOC_AR7242:
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "u-boot-env",
.offset = 0x040000,
.size = 0x010000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x050000,
.size = 0x500000,
- } , {
+ }, {
.name = "uImage",
.offset = 0x550000,
.size = 0x100000,
- } , {
+ }, {
.name = "ART",
.offset = 0x650000,
.size = 0x1b0000,
static struct flash_platform_data ap81_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = ap81_partitions,
- .nr_parts = ARRAY_SIZE(ap81_partitions),
+ .parts = ap81_partitions,
+ .nr_parts = ARRAY_SIZE(ap81_partitions),
#endif
};
.threshold = 3,
.gpio = AP81_GPIO_BTN_SW1,
.active_low = 1,
- } , {
+ }, {
.desc = "sw4",
.type = EV_KEY,
.code = BTN_1,
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "u-boot-env",
.offset = 0x040000,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x060000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x1a0000,
.size = 0x650000,
- } , {
+ }, {
.name = "art",
.offset = 0x7f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x060000,
.size = 0x790000,
static struct ar91xx_flash_platform_data ap83_flash_data = {
.width = 2,
#ifdef CONFIG_MTD_PARTITIONS
- .parts = ap83_flash_partitions,
- .nr_parts = ARRAY_SIZE(ap83_flash_partitions),
+ .parts = ap83_flash_partitions,
+ .nr_parts = ARRAY_SIZE(ap83_flash_partitions),
#endif
};
.threshold = 3,
.gpio = AP83_GPIO_BTN_RESET,
.active_low = 1,
- } , {
+ }, {
.desc = "jumpstart",
.type = EV_KEY,
.code = KEY_WPS_BUTTON,
static void __init ap83_040_setup(void)
{
- ap83_flash_data.is_shared=1;
+ ap83_flash_data.is_shared = 1;
ap83_generic_setup();
platform_device_register(&ap83_040_spi_device);
}
.offset = 0,
.size = 0x030000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "env",
.offset = 0x030000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x040000,
.size = 0x600000,
- } , {
+ }, {
.name = "uImage",
.offset = 0x640000,
.size = 0x1b0000,
- } , {
+ }, {
.name = "caldata",
.offset = 0x7f0000,
.size = 0x010000,
static struct flash_platform_data ap96_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = ap96_partitions,
- .nr_parts = ARRAY_SIZE(ap96_partitions),
+ .parts = ap96_partitions,
+ .nr_parts = ARRAY_SIZE(ap96_partitions),
#endif
};
ar71xx_add_device_m25p80(&ap96_flash_data);
- ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap96_leds_gpio),
- ap96_leds_gpio);
+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(ap96_leds_gpio),
+ ap96_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, AP96_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(ap96_gpio_buttons),
- ap96_gpio_buttons);
+ ARRAY_SIZE(ap96_gpio_buttons),
+ ap96_gpio_buttons);
ap94_pci_init(art + AP96_CALDATA0_OFFSET,
art + AP96_WMAC0_MAC_OFFSET,
static struct flash_platform_data dir_600_a1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = dir_600_a1_partitions,
- .nr_parts = ARRAY_SIZE(dir_600_a1_partitions),
+ .parts = dir_600_a1_partitions,
+ .nr_parts = ARRAY_SIZE(dir_600_a1_partitions),
#endif
};
u8 *mac = NULL;
if (nvram_parse_mac_addr(nvram, DIR_600_A1_NVRAM_SIZE,
- "lan_mac=", mac_buff) == 0) {
+ "lan_mac=", mac_buff) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
mac = mac_buff;
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "config",
.offset = 0x020000,
.size = 0x010000,
- } , {
+ }, {
.name = "kernel",
.offset = 0x030000,
.size = 0x0d0000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x100000,
.size = 0x2f0000,
- } , {
+ }, {
.name = "art",
.offset = 0x3f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x030000,
.size = 0x3c0000,
static struct flash_platform_data dir_615c1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = dir_615c1_partitions,
- .nr_parts = ARRAY_SIZE(dir_615c1_partitions),
+ .parts = dir_615c1_partitions,
+ .nr_parts = ARRAY_SIZE(dir_615c1_partitions),
#endif
};
.name = "dir-615c1:green:wancpu",
.gpio = DIR_615C1_GPIO_LED_GREEN_WANCPU,
.active_low = 1,
- }, {
+ }, {
.name = "dir-615c1:green:wlan",
.gpio = DIR_615C1_GPIO_LED_GREEN_WLAN,
.active_low = 1,
- }, {
- .name = "dir-615c1:green:status",
- .gpio = DIR_615C1_GPIO_LED_GREEN_STATUS,
+ }, {
+ .name = "dir-615c1:green:status",
+ .gpio = DIR_615C1_GPIO_LED_GREEN_STATUS,
.active_low = 1,
}, {
.name = "dir-615c1:orange:wan",
u8 *wlan_mac = NULL;
if (nvram_parse_mac_addr(config, DIR_615C1_CONFIG_SIZE,
- "lan_mac=", mac) == 0) {
+ "lan_mac=", mac) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
wlan_mac = mac;
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "config",
.offset = 0x040000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x050000,
.size = 0x610000,
- } , {
+ }, {
.name = "caldata",
.offset = 0x660000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "unknown",
.offset = 0x670000,
.size = 0x190000,
static struct flash_platform_data dir825b1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = dir825b1_partitions,
- .nr_parts = ARRAY_SIZE(dir825b1_partitions),
+ .parts = dir825b1_partitions,
+ .nr_parts = ARRAY_SIZE(dir825b1_partitions),
#endif
};
.threshold = 3,
.gpio = DIR825B1_GPIO_BTN_RESET,
.active_low = 1,
- } , {
+ }, {
.desc = "powersave",
.type = EV_KEY,
.code = BTN_1,
static u16 eap7660d_wmac1_eeprom[ATH5K_PLAT_EEP_MAX_WORDS];
static struct ar71xx_pci_irq eap7660d_pci_irqs[] __initdata = {
- {
- .slot = 0,
- .pin = 1,
- .irq = AR71XX_PCI_IRQ_DEV0,
- }, {
- .slot = 1,
- .pin = 1,
- .irq = AR71XX_PCI_IRQ_DEV1,
- }
+ {
+ .slot = 0,
+ .pin = 1,
+ .irq = AR71XX_PCI_IRQ_DEV0,
+ }, {
+ .slot = 1,
+ .pin = 1,
+ .irq = AR71XX_PCI_IRQ_DEV1,
+ }
};
static int eap7660d_pci_plat_dev_init(struct pci_dev *dev)
{
- switch(PCI_SLOT(dev->devfn)) {
+ switch (PCI_SLOT(dev->devfn)) {
case 17:
dev->dev.platform_data = &eap7660d_wmac0_data;
break;
}
void __init eap7660d_pci_init(u8 *cal_data0, u8 *mac_addr0,
- u8 *cal_data1, u8 *mac_addr1)
+ u8 *cal_data1, u8 *mac_addr1)
{
if (cal_data0 && *cal_data0 == 0xa55a) {
memcpy(eap7660d_wmac0_eeprom, cal_data0,
ar71xx_add_device_usb();
ar71xx_add_device_gpio_buttons(-1, JWAP003_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(jwap003_gpio_buttons),
- jwap003_gpio_buttons);
+ ARRAY_SIZE(jwap003_gpio_buttons),
+ jwap003_gpio_buttons);
pb42_pci_init();
}
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "u-boot-env",
.offset = 0x040000,
.size = 0x010000,
- } , {
+ }, {
.name = "kernel",
.offset = 0x050000,
.size = 0x160000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x1b0000,
.size = 0x630000,
- } , {
+ }, {
.name = "art",
.offset = 0x7e0000,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x050000,
.size = 0x790000,
static struct flash_platform_data mzk_w04nu_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = mzk_w04nu_partitions,
- .nr_parts = ARRAY_SIZE(mzk_w04nu_partitions),
+ .parts = mzk_w04nu_partitions,
+ .nr_parts = ARRAY_SIZE(mzk_w04nu_partitions),
#endif
};
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "u-boot-env",
.offset = 0x040000,
.size = 0x010000,
- } , {
+ }, {
.name = "kernel",
.offset = 0x050000,
.size = 0x160000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x1b0000,
.size = 0x630000,
- } , {
+ }, {
.name = "art",
.offset = 0x7e0000,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x050000,
.size = 0x790000,
static struct flash_platform_data mzk_w300nh_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = mzk_w300nh_partitions,
- .nr_parts = ARRAY_SIZE(mzk_w300nh_partitions),
+ .parts = mzk_w300nh_partitions,
+ .nr_parts = ARRAY_SIZE(mzk_w300nh_partitions),
#endif
};
ar71xx_add_device_m25p80(&mzk_w300nh_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w300nh_leds_gpio),
- mzk_w300nh_leds_gpio);
+ mzk_w300nh_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, MZK_W04NU_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(mzk_w300nh_gpio_buttons),
- mzk_w300nh_gpio_buttons);
+ ARRAY_SIZE(mzk_w300nh_gpio_buttons),
+ mzk_w300nh_gpio_buttons);
ar913x_add_device_wmac(eeprom, NULL);
}
.offset = 0,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "U-Boot Config",
.offset = 0x010000,
.size = 0x030000,
- } , {
+ }, {
.name = "U-Boot",
.offset = 0x040000,
.size = 0x030000,
- } , {
+ }, {
.name = "linux",
.offset = 0x070000,
.size = 0x0e0000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x150000,
.size = 0x2a0000,
- } , {
+ }, {
.name = "CalibData",
.offset = 0x3f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x070000,
.size = 0x380000,
static struct flash_platform_data nbg460n_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = nbg460n_partitions,
- .nr_parts = ARRAY_SIZE(nbg460n_partitions),
+ .parts = nbg460n_partitions,
+ .nr_parts = ARRAY_SIZE(nbg460n_partitions),
#endif
};
static struct rtl8366s_platform_data nbg460n_rtl8366s_data = {
- .gpio_sda = NBG460N_GPIO_RTL8366_SDA,
- .gpio_sck = NBG460N_GPIO_RTL8366_SCK,
+ .gpio_sda = NBG460N_GPIO_RTL8366_SDA,
+ .gpio_sck = NBG460N_GPIO_RTL8366_SCK,
};
static struct platform_device nbg460n_rtl8366s_device = {
static void __init nbg460n_setup(void)
{
- /* end of bootloader sector contains mac address*/
+ /* end of bootloader sector contains mac address */
u8 *mac = (u8 *) KSEG1ADDR(0x1fc0fff8);
/* last sector contains wlan calib data */
u8 *eeprom = (u8 *) KSEG1ADDR(0x1fff1000);
.threshold = 3,
.gpio = PB42_GPIO_BTN_SW4,
.active_low = 1,
- } , {
+ }, {
.desc = "sw5",
.type = EV_KEY,
.code = BTN_1,
ar71xx_add_device_eth(1);
ar71xx_add_device_gpio_buttons(-1, PB42_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(pb42_gpio_buttons),
- pb42_gpio_buttons);
+ ARRAY_SIZE(pb42_gpio_buttons),
+ pb42_gpio_buttons);
pb42_pci_init();
}
.threshold = 3,
.gpio = PB44_GPIO_SW_RESET,
.active_low = 1,
- } , {
+ }, {
.desc = "jumpstart",
.type = EV_KEY,
.code = KEY_WPS_BUTTON,
pb42_pci_init();
i2c_register_board_info(0, pb44_i2c_board_info,
- ARRAY_SIZE(pb44_i2c_board_info));
+ ARRAY_SIZE(pb44_i2c_board_info));
platform_device_register(&pb44_i2c_gpio_device);
platform_device_register(&pb44_spi_device);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(pb44_leds_gpio),
- pb44_leds_gpio);
+ pb44_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, 20, ARRAY_SIZE(pb44_gpio_buttons),
- pb44_gpio_buttons);
+ pb44_gpio_buttons);
}
MIPS_MACHINE(AR71XX_MACH_PB44, "PB44", "Atheros PB44", pb44_init);
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "u-boot-env",
.offset = 0x040000,
.size = 0x010000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x050000,
.size = 0x2b0000,
- } , {
+ }, {
.name = "uImage",
.offset = 0x300000,
.size = 0x0e0000,
- } , {
+ }, {
.name = "ART",
.offset = 0x3e0000,
.size = 0x020000,
static struct flash_platform_data pb92_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = pb92_partitions,
- .nr_parts = ARRAY_SIZE(pb92_partitions),
+ .parts = pb92_partitions,
+ .nr_parts = ARRAY_SIZE(pb92_partitions),
#endif
};
.threshold = 3,
.gpio = PB92_GPIO_BTN_SW4,
.active_low = 1,
- } , {
+ }, {
.desc = "sw5",
.type = EV_KEY,
.code = BTN_1,
ar71xx_add_device_eth(1);
ar71xx_add_device_gpio_buttons(-1, PB92_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(pb92_gpio_buttons),
- pb92_gpio_buttons);
+ ARRAY_SIZE(pb92_gpio_buttons),
+ pb92_gpio_buttons);
pb9x_pci_init();
}
#endif /* CONFIG_MTD_PARTITIONS */
static struct flash_platform_data rb4xx_flash_data = {
- .type = "pm25lv512",
- .parts = rb4xx_partitions,
- .nr_parts = rb4xx_num_partitions,
+ .type = "pm25lv512",
+ .parts = rb4xx_partitions,
+ .nr_parts = rb4xx_num_partitions,
};
static struct rb4xx_cpld_platform_data rb4xx_cpld_data = {
static void __init rb4xx_generic_setup(void)
{
ar71xx_gpio_function_enable(AR71XX_GPIO_FUNC_SPI_CS1_EN |
- AR71XX_GPIO_FUNC_SPI_CS2_EN);
+ AR71XX_GPIO_FUNC_SPI_CS2_EN);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(rb4xx_leds_gpio),
rb4xx_leds_gpio);
ret = 1;
- unlock:
+unlock:
spin_unlock_irqrestore(&lock, flags);
return ret;
}
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "config",
.offset = 0x020000,
.size = 0x010000,
- } , {
+ }, {
.name = "kernel",
.offset = 0x030000,
.size = 0x0d0000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x100000,
.size = 0x2f0000,
- } , {
+ }, {
.name = "art",
.offset = 0x3f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x030000,
.size = 0x3c0000,
static struct flash_platform_data tew_632brp_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = tew_632brp_partitions,
- .nr_parts = ARRAY_SIZE(tew_632brp_partitions),
+ .parts = tew_632brp_partitions,
+ .nr_parts = ARRAY_SIZE(tew_632brp_partitions),
#endif
};
u8 *wlan_mac = NULL;
if (nvram_parse_mac_addr(config, TEW_632BRP_CONFIG_SIZE,
- "lan_mac=", mac) == 0) {
+ "lan_mac=", mac) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
wlan_mac = mac;
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x020000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x160000,
.size = 0x290000,
- } , {
+ }, {
.name = "art",
.offset = 0x3f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x020000,
.size = 0x3d0000,
#endif /* CONFIG_MTD_PARTITIONS */
static struct flash_platform_data tl_mr3420_flash_data = {
- .parts = tl_mr3420_partitions,
- .nr_parts = tl_mr3420_num_partitions,
+ .parts = tl_mr3420_partitions,
+ .nr_parts = tl_mr3420_num_partitions,
};
static struct gpio_led tl_mr3420_leds_gpio[] __initdata = {
u8 *ee = (u8 *) KSEG1ADDR(0x1fff1000);
/* enable power for the USB port */
- gpio_request(TL_MR3420_GPIO_USB_POWER,"USB power");
+ gpio_request(TL_MR3420_GPIO_USB_POWER, "USB power");
gpio_direction_output(TL_MR3420_GPIO_USB_POWER, 1);
ar71xx_add_device_m25p80(&tl_mr3420_flash_data);
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x020000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x160000,
.size = 0x290000,
- } , {
+ }, {
.name = "art",
.offset = 0x3f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x020000,
.size = 0x3d0000,
static struct flash_platform_data tl_wa901nd_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = tl_wa901nd_partitions,
- .nr_parts = ARRAY_SIZE(tl_wa901nd_partitions),
+ .parts = tl_wa901nd_partitions,
+ .nr_parts = ARRAY_SIZE(tl_wa901nd_partitions),
#endif
};
ar71xx_add_device_m25p80(&tl_wa901nd_flash_data);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(tl_wa901nd_leds_gpio),
- tl_wa901nd_leds_gpio);
+ tl_wa901nd_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, TL_WA901ND_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(tl_wa901nd_gpio_buttons),
- tl_wa901nd_gpio_buttons);
+ ARRAY_SIZE(tl_wa901nd_gpio_buttons),
+ tl_wa901nd_gpio_buttons);
ap91_pci_init(ee, mac);
}
MIPS_MACHINE(AR71XX_MACH_TL_WA901ND, "TL-WA901ND", "TP-LINK TL-WA901ND",
- tl_wa901nd_setup);
+ tl_wa901nd_setup);
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x020000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x160000,
.size = 0x690000,
- } , {
+ }, {
.name = "art",
.offset = 0x7f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x020000,
.size = 0x7d0000,
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x020000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x160000,
.size = 0x290000,
- } , {
+ }, {
.name = "art",
.offset = 0x3f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x020000,
.size = 0x3d0000,
static struct flash_platform_data tl_wr741nd_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = tl_wr741nd_partitions,
- .nr_parts = ARRAY_SIZE(tl_wr741nd_partitions),
+ .parts = tl_wr741nd_partitions,
+ .nr_parts = ARRAY_SIZE(tl_wr741nd_partitions),
#endif
};
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x020000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x160000,
.size = 0x280000,
- } , {
+ }, {
.name = "config",
.offset = 0x3e0000,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x020000,
.size = 0x3c0000,
static struct flash_platform_data tl_wr841n_v1_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = tl_wr841n_v1_partitions,
- .nr_parts = ARRAY_SIZE(tl_wr841n_v1_partitions),
+ .parts = tl_wr841n_v1_partitions,
+ .nr_parts = ARRAY_SIZE(tl_wr841n_v1_partitions),
#endif
};
.offset = 0,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x020000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x160000,
.size = 0x290000,
- } , {
+ }, {
.name = "art",
.offset = 0x3f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x020000,
.size = 0x3d0000,
static struct flash_platform_data tl_wr941nd_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = tl_wr941nd_partitions,
- .nr_parts = ARRAY_SIZE(tl_wr941nd_partitions),
+ .parts = tl_wr941nd_partitions,
+ .nr_parts = ARRAY_SIZE(tl_wr941nd_partitions),
#endif
};
.offset = 0,
.size = 0x050000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "env",
.offset = 0x050000,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x070000,
.size = 0x720000,
- } , {
+ }, {
.name = "config",
.offset = 0x790000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "config_bak",
.offset = 0x7a0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "pot",
.offset = 0x7b0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "traffic_meter",
.offset = 0x7c0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "language",
.offset = 0x7d0000,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "caldata",
.offset = 0x7f0000,
.size = 0x010000,
static struct flash_platform_data wndr3700_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = wndr3700_partitions,
- .nr_parts = ARRAY_SIZE(wndr3700_partitions),
+ .parts = wndr3700_partitions,
+ .nr_parts = ARRAY_SIZE(wndr3700_partitions),
#endif
};
.threshold = 3,
.gpio = WNDR3700_GPIO_BTN_WPS,
.active_low = 1,
- } , {
+ }, {
.desc = "wifi",
.type = EV_KEY,
.code = BTN_2,
};
static struct rtl8366s_platform_data wndr3700_rtl8366s_data = {
- .gpio_sda = WNDR3700_GPIO_RTL8366_SDA,
- .gpio_sck = WNDR3700_GPIO_RTL8366_SCK,
+ .gpio_sda = WNDR3700_GPIO_RTL8366_SDA,
+ .gpio_sck = WNDR3700_GPIO_RTL8366_SCK,
};
static struct platform_device wndr3700_rtl8366s_device = {
ar71xx_add_device_m25p80(&wndr3700_flash_data);
- ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wndr3700_leds_gpio),
- wndr3700_leds_gpio);
+ ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wndr3700_leds_gpio),
+ wndr3700_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, WNDR3700_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(wndr3700_gpio_buttons),
- wndr3700_gpio_buttons);
+ ARRAY_SIZE(wndr3700_gpio_buttons),
+ wndr3700_gpio_buttons);
platform_device_register(&wndr3700_rtl8366s_device);
platform_device_register_simple("wndr3700-led-usb", -1, NULL, 0);
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "u-boot-env",
.offset = 0x040000,
.size = 0x010000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x050000,
.size = 0x240000,
- } , {
+ }, {
.name = "user-config",
.offset = 0x290000,
.size = 0x010000,
- } , {
+ }, {
.name = "uImage",
.offset = 0x2a0000,
.size = 0x120000,
- } , {
+ }, {
.name = "language_table",
.offset = 0x3c0000,
.size = 0x020000,
- } , {
+ }, {
.name = "rootfs_checksum",
.offset = 0x3e0000,
.size = 0x010000,
- } , {
+ }, {
.name = "art",
.offset = 0x3f0000,
.size = 0x010000,
static struct flash_platform_data wnr2000_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = wnr2000_partitions,
- .nr_parts = ARRAY_SIZE(wnr2000_partitions),
+ .parts = wnr2000_partitions,
+ .nr_parts = ARRAY_SIZE(wnr2000_partitions),
#endif
};
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "kernel",
.offset = 0x040000,
.size = 0x0e0000,
- } , {
+ }, {
.name = "filesytem",
.offset = 0x120000,
.size = 0x6c0000,
- } , {
+ }, {
.name = "nvram",
.offset = 0x7e0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "ART",
.offset = 0x7f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x040000,
.size = 0x7a0000,
static struct flash_platform_data wrt160nl_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = wrt160nl_partitions,
- .nr_parts = ARRAY_SIZE(wrt160nl_partitions),
+ .parts = wrt160nl_partitions,
+ .nr_parts = ARRAY_SIZE(wrt160nl_partitions),
#endif
};
u8 mac[6];
if (nvram_parse_mac_addr(nvram, WRT160NL_NVRAM_SIZE,
- "lan_hwaddr=", mac) == 0) {
+ "lan_hwaddr=", mac) == 0) {
ar71xx_init_mac(ar71xx_eth0_data.mac_addr, mac, 0);
ar71xx_init_mac(ar71xx_eth1_data.mac_addr, mac, 1);
}
ar71xx_add_device_usb();
if (nvram_parse_mac_addr(nvram, WRT160NL_NVRAM_SIZE,
- "wl0_hwaddr=", mac) == 0)
+ "wl0_hwaddr=", mac) == 0)
ar913x_add_device_wmac(eeprom, mac);
else
ar913x_add_device_wmac(eeprom, NULL);
.offset = 0,
.size = 0x030000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "env",
.offset = 0x030000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "linux",
.offset = 0x040000,
.size = 0x140000,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x180000,
.size = 0x630000,
- } , {
+ }, {
.name = "nvram",
.offset = 0x7b0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "factory",
.offset = 0x7c0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "language",
.offset = 0x7d0000,
.size = 0x020000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "caldata",
.offset = 0x7f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x040000,
.size = 0x770000,
static struct flash_platform_data wrt400n_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = wrt400n_partitions,
- .nr_parts = ARRAY_SIZE(wrt400n_partitions),
+ .parts = wrt400n_partitions,
+ .nr_parts = ARRAY_SIZE(wrt400n_partitions),
#endif
};
.threshold = 3,
.gpio = WRT400N_GPIO_BTN_RESET,
.active_low = 1,
- } , {
+ }, {
.desc = "wlsec",
.type = EV_KEY,
.code = KEY_WPS_BUTTON,
static struct ar91xx_flash_platform_data wzrhpg300nh_flash_data = {
.width = 2,
#ifdef CONFIG_MTD_PARTITIONS
- .parts = wzrhpg300nh_flash_partitions,
- .nr_parts = ARRAY_SIZE(wzrhpg300nh_flash_partitions),
+ .parts = wzrhpg300nh_flash_partitions,
+ .nr_parts = ARRAY_SIZE(wzrhpg300nh_flash_partitions),
#endif
};
};
static struct rtl8366s_platform_data wzrhpg300nh_rtl8366s_data = {
- .gpio_sda = WZRHPG300NH_GPIO_RTL8366_SDA,
- .gpio_sck = WZRHPG300NH_GPIO_RTL8366_SCK,
+ .gpio_sda = WZRHPG300NH_GPIO_RTL8366_SDA,
+ .gpio_sck = WZRHPG300NH_GPIO_RTL8366_SCK,
};
static struct platform_device wzrhpg300nh_rtl8366s_device = {
platform_device_register(&wzrhpg300nh_rtl8366s_device);
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(wzrhpg300nh_leds_gpio),
- wzrhpg300nh_leds_gpio);
+ wzrhpg300nh_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, WZRHPG300NH_BUTTONS_POLL_INTERVAL,
- ARRAY_SIZE(wzrhpg300nh_gpio_buttons),
- wzrhpg300nh_gpio_buttons);
+ ARRAY_SIZE(wzrhpg300nh_gpio_buttons),
+ wzrhpg300nh_gpio_buttons);
}
.offset = 0,
.size = 0x040000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "u-boot-env",
.offset = 0x040000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "rootfs",
.offset = 0x050000,
.size = 0x610000,
- } , {
+ }, {
.name = "kernel",
.offset = 0x660000,
.size = 0x170000,
- } , {
+ }, {
.name = "configure",
.offset = 0x7d0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "mfg",
.offset = 0x7e0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "eeprom",
.offset = 0x7f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
- } , {
+ }, {
.name = "firmware",
.offset = 0x050000,
.size = 0x780000,
static struct flash_platform_data zcn_1523h_flash_data = {
#ifdef CONFIG_MTD_PARTITIONS
- .parts = zcn_1523h_partitions,
- .nr_parts = ARRAY_SIZE(zcn_1523h_partitions),
+ .parts = zcn_1523h_partitions,
+ .nr_parts = ARRAY_SIZE(zcn_1523h_partitions),
#endif
};
ar71xx_add_device_m25p80(&zcn_1523h_flash_data);
ar71xx_add_device_leds_gpio(0, ARRAY_SIZE(zcn_1523h_leds_gpio),
- zcn_1523h_leds_gpio);
+ zcn_1523h_leds_gpio);
ar71xx_add_device_gpio_buttons(-1, ZCN_1523H_BUTTONS_POLL_INTERVAL,
ARRAY_SIZE(zcn_1523h_gpio_buttons),
zcn_1523h_generic_setup();
ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_2_leds_gpio),
- zcn_1523h_2_leds_gpio);
+ zcn_1523h_2_leds_gpio);
}
MIPS_MACHINE(AR71XX_MACH_ZCN_1523H_2, "ZCN-1523H-2", "Zcomax ZCN-1523H-2",
zcn_1523h_generic_setup();
ar71xx_add_device_leds_gpio(1, ARRAY_SIZE(zcn_1523h_5_leds_gpio),
- zcn_1523h_5_leds_gpio);
+ zcn_1523h_5_leds_gpio);
ar71xx_add_device_eth(1);
}
ret = 0;
- free:
+free:
vfree(buf);
return ret;
}
unsigned long size;
for (size = AR71XX_MEM_SIZE_MIN; size < AR71XX_MEM_SIZE_MAX;
- size <<= 1 ) {
+ size <<= 1) {
if (!memcmp(ar71xx_detect_mem_size,
ar71xx_detect_mem_size + size, 1024))
break;
* Copyright (C) 2008 Imre Kaloz <kaloz@openwrt.org>
*
* This file was derived from: inlude/asm-mips/mach-generic/mangle-port.h
- * Copyright (C) 2003, 2004 Ralf Baechle
+ * Copyright (C) 2003, 2004 Ralf Baechle
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published
u8 has_ar8216:1;
u8 has_ar7240_switch:1;
- void (* ddr_flush)(void);
- void (* set_pll)(int speed);
+ void (*ddr_flush)(void);
+ void (*set_pll)(int speed);
u32 fifo_cfg1;
u32 fifo_cfg2;
return 0;
- err_unmap_ctrl:
+err_unmap_ctrl:
iounmap(ar724x_pci_ctrl_base);
- err_unmap_devcfg:
+err_unmap_devcfg:
iounmap(ar724x_pci_devcfg_base);
- err_unmap_localcfg:
+err_unmap_localcfg:
iounmap(ar724x_pci_localcfg_base);
- err:
+err:
return ret;
}
platform_set_drvdata(pdev, nxp);
return 0;
- err_free_2y:
+err_free_2y:
gpio_free(pdata->gpio_pin_2y);
- err_free_1y:
+err_free_1y:
gpio_free(pdata->gpio_pin_1y);
- err_free_s1:
+err_free_s1:
gpio_free(pdata->gpio_pin_s1);
- err_free_s0:
+err_free_s0:
gpio_free(pdata->gpio_pin_s0);
- err_free_nxp:
+err_free_nxp:
kfree(nxp);
return err;
}
platform_set_drvdata(pdev, drvdata);
return 0;
- err:
+err:
for (i = i - 1; i >= 0; i--)
led_classdev_unregister(&drvdata->led_devs[i].cdev);
add_mtd_device(info->mtd);
return 0;
- err_out:
+err_out:
ar91xx_flash_remove(pdev);
return err;
}
return 0;
- fail:
+fail:
if (info->mtd->suspend) {
BUG_ON(!info->mtd->resume);
info->mtd->resume(info->mtd);
return 0;
- err_release_nand:
+err_release_nand:
nand_release(&info->mtd);
- err_set_drvdata:
+err_set_drvdata:
platform_set_drvdata(pdev, NULL);
- err_free_info:
+err_free_info:
kfree(info);
- err_free_gpio_nce:
+err_free_gpio_nce:
gpio_free(RB4XX_NAND_GPIO_NCE);
- err_free_gpio_cle:
+err_free_gpio_cle:
gpio_free(RB4XX_NAND_GPIO_CLE);
- err_free_gpio_ale:
+err_free_gpio_ale:
gpio_free(RB4XX_NAND_GPIO_ALE);
- err_free_gpio_ready:
+err_free_gpio_ready:
gpio_free(RB4XX_NAND_GPIO_READY);
- err:
+err:
return ret;
}
return 0;
- err_release_nand:
+err_release_nand:
nand_release(&info->mtd);
- err_set_drvdata:
+err_set_drvdata:
platform_set_drvdata(pdev, NULL);
- err_free_info:
+err_free_info:
kfree(info);
return ret;
}
*pparts = trx_parts;
ret = TRX_PARTS;
- free_hdr:
+free_hdr:
vfree(header);
- out:
+out:
return ret;
}
struct ag71xx_buf {
struct sk_buff *skb;
- struct ag71xx_desc *desc;
+ struct ag71xx_desc *desc;
dma_addr_t dma_addr;
u32 pad;
};
unsigned int link;
unsigned int speed;
- int duplex;
+ int duplex;
struct work_struct restart_work;
struct timer_list oom_timer;
AR7240_MASK_CTRL_SOFT_RESET);
ret = ar7240sw_reg_wait(as, AR7240_REG_MASK_CTRL,
- AR7240_MASK_CTRL_SOFT_RESET, 0, 1000);
+ AR7240_MASK_CTRL_SOFT_RESET, 0, 1000);
return ret;
}
static int
ar7240_set_vid(struct switch_dev *dev, const struct switch_attr *attr,
- struct switch_val *val)
+ struct switch_val *val)
{
struct ar7240sw *as = sw_to_ar7240(dev);
as->vlan_id[val->port_vlan] = val->value.i;
static int
ar7240_get_vid(struct switch_dev *dev, const struct switch_attr *attr,
- struct switch_val *val)
+ struct switch_val *val)
{
struct ar7240sw *as = sw_to_ar7240(dev);
val->value.i = as->vlan_id[val->port_vlan];
static int
ar7240_set_vlan(struct switch_dev *dev, const struct switch_attr *attr,
- struct switch_val *val)
+ struct switch_val *val)
{
struct ar7240sw *as = sw_to_ar7240(dev);
as->vlan = !!val->value.i;
static int
ar7240_get_vlan(struct switch_dev *dev, const struct switch_attr *attr,
- struct switch_val *val)
+ struct switch_val *val)
{
struct ar7240sw *as = sw_to_ar7240(dev);
val->value.i = as->vlan;
swdev->ops = &ar7240_ops;
if (register_switch(&as->swdev, ag->dev) < 0) {
- kfree(as);
- return NULL;
+ kfree(as);
+ return NULL;
}
printk("%s: Found an AR7240 built-in switch\n", ag->dev->name);
static ssize_t read_file_int_stats(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{
-#define PR_INT_STAT(_label, _field) \
- len += snprintf(buf + len, sizeof(buf) - len, \
+#define PR_INT_STAT(_label, _field) \
+ len += snprintf(buf + len, sizeof(buf) - len, \
"%20s: %10lu\n", _label, ag->debug.int_stats._field);
struct ag71xx *ag = file->private_data;
return 0;
- err:
+err:
ag71xx_debugfs_exit(ag);
return -ENOMEM;
}
#include "ag71xx.h"
#define AG71XX_DEFAULT_MSG_ENABLE \
- ( NETIF_MSG_DRV \
+ (NETIF_MSG_DRV \
| NETIF_MSG_PROBE \
| NETIF_MSG_LINK \
| NETIF_MSG_TIMER \
| NETIF_MSG_IFDOWN \
| NETIF_MSG_IFUP \
| NETIF_MSG_RX_ERR \
- | NETIF_MSG_TX_ERR )
+ | NETIF_MSG_TX_ERR)
static int ag71xx_msg_level = -1;
return 0;
- err:
+err:
return err;
}
return 0;
- err:
+err:
ag71xx_rings_cleanup(ag);
return ret;
}
return NETDEV_TX_OK;
- err_drop:
+err_drop:
dev->stats.tx_dropped++;
dev_kfree_skb(skb);
return rx_done;
}
- more:
+more:
DBG("%s: stay in polling mode, rx=%d, tx=%d, limit=%d\n",
dev->name, rx_done, tx_done, limit);
return rx_done;
- oom:
+oom:
if (netif_msg_rx_err(ag))
printk(KERN_DEBUG "%s: out of memory\n", dev->name);
return 0;
- err_phy_disconnect:
+err_phy_disconnect:
ag71xx_phy_disconnect(ag);
- err_unregister_netdev:
+err_unregister_netdev:
unregister_netdev(dev);
- err_free_irq:
+err_free_irq:
free_irq(dev->irq, dev);
- err_unmap_mii_ctrl:
+err_unmap_mii_ctrl:
iounmap(ag->mii_ctrl);
- err_unmap_base:
+err_unmap_base:
iounmap(ag->mac_base);
- err_free_dev:
+err_free_dev:
kfree(dev);
- err_out:
+err_out:
platform_set_drvdata(pdev, NULL);
return err;
}
return 0;
- err_mdio_exit:
+err_mdio_exit:
ag71xx_mdio_driver_exit();
- err_debugfs_exit:
+err_debugfs_exit:
ag71xx_debugfs_root_exit();
- err_out:
+err_out:
return ret;
}
DBG("mii_read: addr=%04x, reg=%04x, value=%04x\n", addr, reg, ret);
- out:
+out:
return ret;
}
platform_set_drvdata(pdev, am);
return 0;
- err_free_bus:
+err_free_bus:
mdiobus_free(am->mii_bus);
- err_iounmap:
+err_iounmap:
iounmap(am->mdio_base);
- err_free_mdio:
+err_free_mdio:
kfree(am);
- err_out:
+err_out:
return err;
}
#define AP83_SPI_GPIO_MISO 3
struct ap83_spi {
- struct spi_bitbang bitbang;
- void __iomem *base;
+ struct spi_bitbang bitbang;
+ void __iomem *base;
u32 addr;
struct platform_device *pdev;
return 0;
- err_unmap:
+err_unmap:
iounmap(sp->base);
- err_spi_put:
+err_spi_put:
platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master);
- err_free_cs:
+err_free_cs:
gpio_free(AP83_SPI_GPIO_CS);
- err_free_miso:
+err_free_miso:
gpio_free(AP83_SPI_GPIO_MISO);
return ret;
}
#undef PER_BIT_READ
struct ar71xx_spi {
- struct spi_bitbang bitbang;
+ struct spi_bitbang bitbang;
u32 ioc_base;
u32 reg_ctrl;
- void __iomem *base;
+ void __iomem *base;
struct platform_device *pdev;
u32 (*get_ioc_base)(u8 chip_select, int cs_high,
return 0;
iounmap(sp->base);
- err1:
+err1:
platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master);
#undef PER_BIT_READ
struct ar71xx_spi {
- struct spi_bitbang bitbang;
+ struct spi_bitbang bitbang;
u32 ioc_base;
u32 reg_ctrl;
- void __iomem *base;
+ void __iomem *base;
struct platform_device *pdev;
};
return 0;
iounmap(sp->base);
- err1:
+err1:
platform_set_drvdata(pdev, NULL);
spi_master_put(sp->bitbang.master);
__raw_writel(SPI_CTRL_FASTEST, base + SPI_REG_CTRL);
do_spi_init(m->spi);
- list_for_each_entry (t, &m->transfers, transfer_list) {
+ list_for_each_entry(t, &m->transfers, transfer_list) {
int len;
len = rb4xx_spi_txrx(base, t);
if (spi->mode & ~(SPI_CS_HIGH)) {
dev_err(&spi->dev, "mode %x not supported\n",
- (unsigned) spi->mode);
+ (unsigned) spi->mode);
return -EINVAL;
}
if (spi->bits_per_word != 8 && spi->bits_per_word != 0) {
dev_err(&spi->dev, "bits_per_word %u not supported\n",
- (unsigned) spi->bits_per_word);
+ (unsigned) spi->bits_per_word);
return -EINVAL;
}
return 0;
- err_iounmap:
+err_iounmap:
iounmap(rbspi->base);
- err_put_master:
+err_put_master:
platform_set_drvdata(pdev, NULL);
spi_master_put(master);
- err_out:
+err_out:
return err;
}
static struct platform_driver rb4xx_spi_drv = {
.probe = rb4xx_spi_probe,
.remove = rb4xx_spi_remove,
- .driver = {
+ .driver = {
.name = DRV_NAME,
.owner = THIS_MODULE,
- },
+ },
};
static int __init rb4xx_spi_init(void)
return 0;
- err_drvdata:
+err_drvdata:
dev_set_drvdata(&spi->dev, NULL);
kfree(cpld);
#define VSC73XX_MAC_CFG_WEXC_DIS (1 << 31)
#define VSC73XX_MAC_CFG_PORT_RST (1 << 29)
#define VSC73XX_MAC_CFG_TX_EN (1 << 28)
-#define VSC73XX_MAC_CFG_SEED_LOAD (1 << 27)
-#define VSC73XX_MAC_CFG_FDX (1 << 18)
+#define VSC73XX_MAC_CFG_SEED_LOAD (1 << 27)
+#define VSC73XX_MAC_CFG_FDX (1 << 18)
#define VSC73XX_MAC_CFG_GIGE (1 << 17)
#define VSC73XX_MAC_CFG_RX_EN (1 << 16)
#define VSC73XX_MAC_CFG_VLAN_DBLAWR (1 << 15)
rc = vsc7385_icpu_start(vsc);
- out:
+out:
release_firmware(firmware);
return rc;
}
return 0;
- err:
+err:
return err;
}
rev = (t >> VSC73XX_ICPU_CHIPID_REV_SHIFT) &
VSC73XX_ICPU_CHIPID_REV_MASK;
- dev_info(&spi->dev, "VSC%04X (rev. %d) switch found \n", id, rev);
+ dev_info(&spi->dev, "VSC%04X (rev. %d) switch found\n", id, rev);
return 0;
}
pdata = spi->dev.platform_data;
if (!pdata) {
dev_err(&spi->dev, "no platform data specified\n");
- return-ENODEV;
+ return -ENODEV;
}
vsc = kzalloc(sizeof(*vsc), GFP_KERNEL);
if (!vsc) {
dev_err(&spi->dev, "no memory for private data\n");
- return-ENOMEM;
+ return -ENOMEM;
}
mutex_init(&vsc->lock);
spi->bits_per_word = 8;
err = spi_setup(spi);
if (err) {
- dev_err(&spi->dev, "spi_setup failed, err=%d \n", err);
+ dev_err(&spi->dev, "spi_setup failed, err=%d\n", err);
goto err_drvdata;
}
err = vsc7385_detect(vsc);
if (err) {
- dev_err(&spi->dev, "no chip found, err=%d \n", err);
+ dev_err(&spi->dev, "no chip found, err=%d\n", err);
goto err_drvdata;
}
return 0;
- err_drvdata:
+err_drvdata:
dev_set_drvdata(&spi->dev, NULL);
kfree(vsc);
return err;
return 0;
- err_iounmap:
+err_iounmap:
iounmap(hcd->regs);
- err_release_region:
+err_release_region:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- err_put_hcd:
+err_put_hcd:
usb_put_hcd(hcd);
return ret;
}
return 0;
- err_stop_hcd:
+err_stop_hcd:
iounmap(hcd->regs);
- err_release_region:
+err_release_region:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- err_put_hcd:
+err_put_hcd:
usb_put_hcd(hcd);
return ret;
}
return 0;
- err:
+err:
ohci_stop(hcd);
return ret;
}
static ssize_t ar71xx_wdt_write(struct file *file, const char *data,
size_t len, loff_t *ppos)
{
- if (len) {
+ if (len) {
if (!nowayout) {
size_t i;
static struct watchdog_info ar71xx_wdt_info = {
.options = WDIOF_SETTIMEOUT | WDIOF_KEEPALIVEPING |
WDIOF_MAGICCLOSE | WDIOF_CARDRESET,
- .firmware_version = 0,
+ .firmware_version = 0,
.identity = "AR71XX watchdog",
};
printk(KERN_INFO DRV_DESC " version " DRV_VERSION "\n");
printk(KERN_DEBUG DRV_NAME ": timeout=%d secs (max=%d)\n",
- wdt_timeout, max_timeout);
+ wdt_timeout, max_timeout);
return 0;
*/
struct vsc7385_platform_data {
- void (* reset)(void);
+ void (*reset)(void);
char *ucode_name;
struct {
u32 tx_ipg:5;