Date:2010-08-30 23:05:32 (12 years 1 month ago)
Author:Maarten ter Huurne
Commit:4f6832d84edaa76f7e59f0321042ce2b54885b2e
Message:MIPS: JZ4740: Updated board support for Dingoo A320.

Updated to new device names.
Removed init calls that are no longer necessary.
Removed unnecessary code, most of which was already commented out.
Files: arch/mips/jz4740/board-a320.c (2 diffs)

Change Details

arch/mips/jz4740/board-a320.c
283283#ifdef CONFIG_I2C_GPIO
284284    &a320_i2c_device,
285285#endif
286    &jz4740_usb_ohci_device,
287    &jz4740_usb_gdt_device,
286    /* USB host is not usable since the PCB does not route the pins to
287     * a place where new wires can be soldered. */
288    /*&jz4740_usb_ohci_device,*/
289    &jz4740_udc_device,
288290    &jz4740_mmc_device,
289291    &jz4740_nand_device,
290    /* TODO(MtH): A320 equivalent?
291    &qi_lb60_keypad, */
292    /* TODO(MtH): Not needed for Dingux?
293    &spigpio_device, */
294    /*&jz4740_framebuffer_device,*/
295    &jz4740_slcd_framebuffer_device,
292    &jz4740_framebuffer_device,
296293    &jz4740_i2s_device,
297294    &jz4740_codec_device,
298295    &jz4740_rtc_device,
299296    &jz4740_adc_device,
300    &jz4740_battery_device,
301297    &a320_charger_device,
302298    &a320_backlight_device,
303299    &a320_gpio_keys_device,
304300};
305301
302static void __init board_gpio_setup(void)
303{
304    /* We only need to enable/disable pullup here for pins used in generic
305     * drivers. Everything else is done by the drivers themselves. */
306
307    /* Disable pullup of the USB detection pin: on the A320 pullup or not
308     * seems to make no difference, but on A330 the signal will be unstable
309     * when the pullup is enabled. */
310    jz_gpio_disable_pullup(JZ_GPIO_PORTD(28));
311}
312
306313static int __init a320_init_platform_devices(void)
307314{
308    /*jz4740_framebuffer_device.dev.platform_data = &a320_fb_pdata;*/
309    jz4740_slcd_framebuffer_device.dev.platform_data = &a320_fb_pdata;
315    jz4740_framebuffer_device.dev.platform_data = &a320_fb_pdata;
310316    jz4740_nand_device.dev.platform_data = &a320_nand_pdata;
311    jz4740_battery_device.dev.platform_data = &a320_battery_pdata;
317    jz4740_adc_device.dev.platform_data = &a320_battery_pdata;
312318    jz4740_mmc_device.dev.platform_data = &a320_mmc_pdata;
313319
314320    jz4740_serial_device_register();
315321
316    /* TODO(MtH): Dingux has no SPI support enabled.
317                  See drivers/spi/Kconfig.
318    spi_register_board_info(a320_spi_board_info,
319                ARRAY_SIZE(a320_spi_board_info));
320    */
321
322322    return platform_add_devices(jz_platform_devices,
323323                    ARRAY_SIZE(jz_platform_devices));
324324}
...... 
328328    .rtc_rate = 32768,
329329};
330330
331extern int jz_gpiolib_init(void);
332
333331static int __init a320_board_setup(void)
334332{
335    printk("JZ4740 A320 board setup\n");
333    printk(KERN_INFO "JZ4740 A320 board setup\n");
336334
337    /* TODO(MtH): Does the blink code require the GPIO to be initialized or not? */
338    if (jz_gpiolib_init())
339        panic("Failed to initalize jz gpio\n");
340335    panic_blink = a320_panic_blink_callback;
341336
342    jz4740_clock_init();
343
344    /* Disable pullup of the USB detection pin: on the A320 pullup or not
345       seems to make no difference, but on A330 the signal will be unstable
346       when the pullup is enabled. */
347    jz_gpio_disable_pullup(JZ_GPIO_PORTD(28));
337    board_gpio_setup();
348338
349339    if (a320_init_platform_devices())
350340        panic("Failed to initalize platform devices\n");

Archive Download the corresponding diff file



interactive