Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * arch/arm/mach-kirkwood/board-ix2200.c
- *
- * Iomega Ix2-200 Board Setup
- *
- * This file is licensed under the terms of the GNU General Public
- * License version 2. This program is licensed "as is" without any
- * warranty of any kind, whether express or implied.
- */
- #include <linux/kernel.h>
- #include <linux/init.h>
- #include <linux/platform_device.h>
- #include <linux/irq.h>
- #include <linux/mtd/partitions.h>
- #include <linux/ata_platform.h>
- #include <linux/mv643xx_eth.h>
- #include <linux/ethtool.h>
- #include <net/dsa.h>
- #include <linux/gpio.h>
- #include <linux/leds.h>
- #include <linux/gpio_keys.h>
- #include <linux/i2c.h>
- #include <linux/input.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <mach/kirkwood.h>
- #include "common.h"
- #include "mpp.h"
- static struct mv643xx_eth_platform_data ix2200_ge00_data = {
- .phy_addr = MV643XX_ETH_PHY_NONE,
- .speed = SPEED_1000,
- .duplex = DUPLEX_FULL,
- };
- static struct mv643xx_eth_platform_data ix2200_ge01_data = {
- .phy_addr = MV643XX_ETH_PHY_ADDR(11),
- };
- /*
- #define ORION_BLINK_HALF_PERIOD 100 ms
- int ix2200_gpio_blink_set(unsigned gpio, int state,
- unsigned long *delay_on, unsigned long *delay_off)
- {
- orion_gpio_set_blink(gpio, state);
- return 0;
- }
- static struct gpio_led_platform_data ix2200_led_data = {
- .leds = ix2200_led_pins,
- .num_leds = ARRAY_SIZE(ix220turn off boot console earlycon00_led_pins),
- .gpio_blink_set = (void*)ix2200_gpio_blink_set,
- };
- static struct platform_device ix2200_leds = {
- .name = "leds-gpio",
- .id = -1,
- .dev = {
- .platform_data = &ix2200_led_data,
- }
- };
- */
- /****************************************************************************
- * GPIO Attached Keys
- ****************************************************************************/
- /*
- #define ix2200_GPIO_KEY_RESET 12
- #define ix2200_GPIO_KEY_POWER 14
- #define ix2200_GPIO_KEY_OTB 35
- #define ix2200_SW_RESET 0x00
- #define ix2200_SW_POWER 0x01
- #define ix2200_SW_OTB 0x02
- static struct gpio_keys_button ix2200_buttons[] = {
- {
- .type = EV_SW,
- .code = ix2200_SW_RESET,
- .gpio = ix2200_GPIO_KEY_RESET,
- .desc = "Reset Button",
- .active_low = 1,
- .debounce_interval = 100,
- },
- {
- .type = EV_SW,
- .code = ix2200_SW_POWER,
- .gpio = ix2200_GPIO_KEY_POWER,
- .desc = "Power Button",
- .active_low = 1,
- .debounce_interval = 100,
- },
- {
- .type = EV_SW,
- .code = ix2200_SW_OTB,
- .gpio = ix2200_GPIO_KEY_OTB,
- .desc = "OTB Button",
- .active_low = 1,
- .debounce_interval = 100,
- },
- };
- static struct gpio_keys_platform_data ix2200_button_data = {
- .buttons = ix2200_buttons,
- .nbuttons = ARRAY_SIZE(ix2200_buttons),
- };
- static struct platform_device ix2200_button_device = {
- .name = "gpio-keys",
- .id = -1,
- .num_resources = 0,
- .dev = {
- .platform_data = &ix2200_button_data,
- },
- };
- */
- static unsigned int ix2200_mpp_config[] __initdata = {
- MPP12_GPIO, /* Reset Button */
- MPP14_GPIO, /* Power Button */
- MPP15_GPIO, /* Backup LED (blue) */
- MPP16_GPIO, /* Power LED (white) */
- MPP35_GPIO, /* OTB Button */
- MPP36_GPIO, /* Rebuild LED (white) */
- MPP37_GPIO, /* Health LED (red) */
- MPP38_GPIO, /* SATA LED brightness control 1 */
- MPP39_GPIO, /* SATA LED brightness control 2 */
- MPP40_GPIO, /* Backup LED brightness control 1 */
- MPP41_GPIO, /* Backup LED brightness control 2 */
- MPP42_GPIO, /* Power LED brightness control 1 */
- MPP43_GPIO, /* Power LED brightness control 2 */
- MPP44_GPIO, /* Health LED brightness control 1 */
- MPP45_GPIO, /* Health LED brightness control 2 */
- MPP46_GPIO, /* Rebuild LED brightness control 1 */
- MPP47_GPIO, /* Rebuild LED brightness control 2 */
- 0
- };
- void __init ix2200_init(void)
- {
- /*
- * Basic setup. Needs to be called early.
- */
- /*kirkwood_init();*/
- kirkwood_mpp_conf(ix2200_mpp_config);
- kirkwood_ehci_init();
- kirkwood_ge00_init(&ix2200_ge00_data);
- kirkwood_ge01_init(&ix2200_ge01_data);
- kirkwood_uart0_init();
- /*platform_device_register(&ix2200_button_device);*/
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement