source: trunk/target/linux/brcm63xx/patches-3.0/141-led_count.patch @ 27880

Last change on this file since 27880 was 27880, checked in by florian, 5 years ago

[brcm63xx] improve BCM6345 support

  • runtime detect the amount of memory available
  • define EBI_BASE as MPI_BASE to get rid of chip-select specific hacks
  • fix GPIO control
File size: 700 bytes
  • arch/mips/bcm63xx/boards/board_bcm963xx.c

    a b int __init board_register_devices(void) 
    883883{ 
    884884        u32 val; 
    885885        int button_count = 0; 
     886        int led_count = 0; 
    886887 
    887888        if (board.has_uart0) 
    888889                bcm63xx_uart_register(0); 
    int __init board_register_devices(void) 
    919920 
    920921        platform_device_register(&mtd_dev); 
    921922 
    922         bcm63xx_led_data.num_leds = ARRAY_SIZE(board.leds); 
     923        /* count number of LEDs defined by this device */ 
     924        while (led_count < ARRAY_SIZE(board.leds) && board.leds[led_count].name) 
     925                led_count++; 
     926 
     927        bcm63xx_led_data.num_leds = led_count; 
    923928        bcm63xx_led_data.leds = board.leds; 
    924929 
    925930        platform_device_register(&bcm63xx_gpio_leds); 
Note: See TracBrowser for help on using the repository browser.