mirror of https://gitee.com/openkylin/linux.git
avr32: data param to at32_add_device_mci() must be non-NULL
at32_add_device_mci() will refuse to add the mci device if the data parameter is NULL. Fix up the favr-32 and hammerhead boards so that this doesn't happen. Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com> Cc: Alex Raimondi <mailinglist@miromico.ch> Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
This commit is contained in:
parent
0e49005090
commit
4209324a74
|
@ -17,6 +17,7 @@
|
||||||
#include <linux/linkage.h>
|
#include <linux/linkage.h>
|
||||||
#include <linux/gpio.h>
|
#include <linux/gpio.h>
|
||||||
#include <linux/leds.h>
|
#include <linux/leds.h>
|
||||||
|
#include <linux/atmel-mci.h>
|
||||||
#include <linux/atmel-pwm-bl.h>
|
#include <linux/atmel-pwm-bl.h>
|
||||||
#include <linux/spi/spi.h>
|
#include <linux/spi/spi.h>
|
||||||
#include <linux/spi/ads7846.h>
|
#include <linux/spi/ads7846.h>
|
||||||
|
@ -79,6 +80,14 @@ static struct spi_board_info __initdata spi1_board_info[] = {
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static struct mci_platform_data __initdata mci0_data = {
|
||||||
|
.slot[0] = {
|
||||||
|
.bus_width = 4,
|
||||||
|
.detect_pin = -ENODEV,
|
||||||
|
.wp_pin = -ENODEV,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
static struct fb_videomode __initdata lb104v03_modes[] = {
|
static struct fb_videomode __initdata lb104v03_modes[] = {
|
||||||
{
|
{
|
||||||
.name = "640x480 @ 50",
|
.name = "640x480 @ 50",
|
||||||
|
@ -321,7 +330,7 @@ static int __init favr32_init(void)
|
||||||
|
|
||||||
at32_add_device_pwm(1 << atmel_pwm_bl_pdata.pwm_channel);
|
at32_add_device_pwm(1 << atmel_pwm_bl_pdata.pwm_channel);
|
||||||
at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
|
at32_add_device_spi(1, spi1_board_info, ARRAY_SIZE(spi1_board_info));
|
||||||
at32_add_device_mci(0, NULL);
|
at32_add_device_mci(0, &mci0_data);
|
||||||
at32_add_device_usba(0, NULL);
|
at32_add_device_usba(0, NULL);
|
||||||
at32_add_device_lcdc(0, &favr32_lcdc_data, fbmem_start, fbmem_size, 0);
|
at32_add_device_lcdc(0, &favr32_lcdc_data, fbmem_start, fbmem_size, 0);
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
* it under the terms of the GNU General Public License version 2 as
|
* it under the terms of the GNU General Public License version 2 as
|
||||||
* published by the Free Software Foundation.
|
* published by the Free Software Foundation.
|
||||||
*/
|
*/
|
||||||
|
#include <linux/atmel-mci.h>
|
||||||
#include <linux/clk.h>
|
#include <linux/clk.h>
|
||||||
#include <linux/fb.h>
|
#include <linux/fb.h>
|
||||||
#include <linux/etherdevice.h>
|
#include <linux/etherdevice.h>
|
||||||
|
@ -86,6 +87,14 @@ struct atmel_lcdfb_info __initdata hammerhead_lcdc_data = {
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
static struct mci_platform_data __initdata mci0_data = {
|
||||||
|
.slot[0] = {
|
||||||
|
.bus_width = 4,
|
||||||
|
.detect_pin = -ENODEV,
|
||||||
|
.wp_pin = -ENODEV,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
struct eth_addr {
|
struct eth_addr {
|
||||||
u8 addr[6];
|
u8 addr[6];
|
||||||
};
|
};
|
||||||
|
@ -204,7 +213,7 @@ static int __init hammerhead_init(void)
|
||||||
#ifdef CONFIG_BOARD_HAMMERHEAD_FPGA
|
#ifdef CONFIG_BOARD_HAMMERHEAD_FPGA
|
||||||
at32_add_device_hh_fpga();
|
at32_add_device_hh_fpga();
|
||||||
#endif
|
#endif
|
||||||
at32_add_device_mci(0, NULL);
|
at32_add_device_mci(0, &mci0_data);
|
||||||
|
|
||||||
#ifdef CONFIG_BOARD_HAMMERHEAD_USB
|
#ifdef CONFIG_BOARD_HAMMERHEAD_USB
|
||||||
at32_add_device_usba(0, NULL);
|
at32_add_device_usba(0, NULL);
|
||||||
|
|
Loading…
Reference in New Issue