mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-27 14:01:05 +02:00
ar71xx: use the generic m25p80 registration code for the MZK-W04NU
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@18938 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
1bb2068541
commit
e783d0854b
@ -11,8 +11,6 @@
|
|||||||
#include <linux/platform_device.h>
|
#include <linux/platform_device.h>
|
||||||
#include <linux/mtd/mtd.h>
|
#include <linux/mtd/mtd.h>
|
||||||
#include <linux/mtd/partitions.h>
|
#include <linux/mtd/partitions.h>
|
||||||
#include <linux/spi/spi.h>
|
|
||||||
#include <linux/spi/flash.h>
|
|
||||||
|
|
||||||
#include <asm/mips_machine.h>
|
#include <asm/mips_machine.h>
|
||||||
#include <asm/mach-ar71xx/ar71xx.h>
|
#include <asm/mach-ar71xx/ar71xx.h>
|
||||||
@ -21,6 +19,7 @@
|
|||||||
#include "dev-ar913x-wmac.h"
|
#include "dev-ar913x-wmac.h"
|
||||||
#include "dev-gpio-buttons.h"
|
#include "dev-gpio-buttons.h"
|
||||||
#include "dev-leds-gpio.h"
|
#include "dev-leds-gpio.h"
|
||||||
|
#include "dev-m25p80.h"
|
||||||
|
|
||||||
#define MZK_W04NU_GPIO_LED_USB 0
|
#define MZK_W04NU_GPIO_LED_USB 0
|
||||||
#define MZK_W04NU_GPIO_LED_STATUS 1
|
#define MZK_W04NU_GPIO_LED_STATUS 1
|
||||||
@ -74,16 +73,6 @@ static struct flash_platform_data mzk_w04nu_flash_data = {
|
|||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct spi_board_info mzk_w04nu_spi_info[] = {
|
|
||||||
{
|
|
||||||
.bus_num = 0,
|
|
||||||
.chip_select = 0,
|
|
||||||
.max_speed_hz = 25000000,
|
|
||||||
.modalias = "m25p80",
|
|
||||||
.platform_data = &mzk_w04nu_flash_data,
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
static struct gpio_led mzk_w04nu_leds_gpio[] __initdata = {
|
static struct gpio_led mzk_w04nu_leds_gpio[] __initdata = {
|
||||||
{
|
{
|
||||||
.name = "mzk-w04nu:green:status",
|
.name = "mzk-w04nu:green:status",
|
||||||
@ -157,8 +146,7 @@ static void __init mzk_w04nu_setup(void)
|
|||||||
ar71xx_add_device_eth(0);
|
ar71xx_add_device_eth(0);
|
||||||
ar71xx_add_device_eth(1);
|
ar71xx_add_device_eth(1);
|
||||||
|
|
||||||
ar71xx_add_device_spi(NULL, mzk_w04nu_spi_info,
|
ar71xx_add_device_m25p80(&mzk_w04nu_flash_data);
|
||||||
ARRAY_SIZE(mzk_w04nu_spi_info));
|
|
||||||
|
|
||||||
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w04nu_leds_gpio),
|
ar71xx_add_device_leds_gpio(-1, ARRAY_SIZE(mzk_w04nu_leds_gpio),
|
||||||
mzk_w04nu_leds_gpio);
|
mzk_w04nu_leds_gpio);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user