^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) * Copyright (C) 2007 Herbert Valerio Riedel <hvr@gnu.org>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) * Copyright (C) 2008 Martin Michlmayr <tbm@cyrius.com>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) *
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5) * This program is free software; you can redistribute it and/or modify
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) * it under the terms of the GNU Lesser General Public License as
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7) * published by the Free Software Foundation; either version 2 of the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) * License, or (at your option) any later version.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) #include <linux/gpio.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) #include <linux/kernel.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) #include <linux/init.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) #include <linux/platform_device.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) #include <linux/irq.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15) #include <linux/mtd/physmap.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) #include <linux/mv643xx_eth.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) #include <linux/leds.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #include <linux/gpio_keys.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #include <linux/input.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #include <linux/i2c.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #include <linux/ata_platform.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22) #include <asm/mach-types.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) #include <asm/mach/arch.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) #include "common.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) #include "mpp.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) #include "orion5x.h"
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define MV2120_NOR_BOOT_BASE 0xf4000000
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) #define MV2120_NOR_BOOT_SIZE SZ_512K
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31) #define MV2120_GPIO_RTC_IRQ 3
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #define MV2120_GPIO_KEY_RESET 17
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33) #define MV2120_GPIO_KEY_POWER 18
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #define MV2120_GPIO_POWER_OFF 19
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 37) /*****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 38) * Ethernet
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 39) ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 40) static struct mv643xx_eth_platform_data mv2120_eth_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 41) .phy_addr = MV643XX_ETH_PHY_ADDR(8),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 42) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 43)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 44) static struct mv_sata_platform_data mv2120_sata_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 45) .n_ports = 2,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 46) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 47)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 48) static struct mtd_partition mv2120_partitions[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 49) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 50) .name = "firmware",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 51) .size = 0x00080000,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 52) .offset = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 53) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 54) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 55)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 56) static struct physmap_flash_data mv2120_nor_flash_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 57) .width = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 58) .parts = mv2120_partitions,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 59) .nr_parts = ARRAY_SIZE(mv2120_partitions)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 60) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 61)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 62) static struct resource mv2120_nor_flash_resource = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 63) .flags = IORESOURCE_MEM,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 64) .start = MV2120_NOR_BOOT_BASE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 65) .end = MV2120_NOR_BOOT_BASE + MV2120_NOR_BOOT_SIZE - 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 66) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 67)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 68) static struct platform_device mv2120_nor_flash = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 69) .name = "physmap-flash",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 70) .id = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 71) .dev = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 72) .platform_data = &mv2120_nor_flash_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 73) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 74) .resource = &mv2120_nor_flash_resource,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 75) .num_resources = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 76) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 77)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 78) static struct gpio_keys_button mv2120_buttons[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 79) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 80) .code = KEY_RESTART,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 81) .gpio = MV2120_GPIO_KEY_RESET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 82) .desc = "reset",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 83) .active_low = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 84) }, {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 85) .code = KEY_POWER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 86) .gpio = MV2120_GPIO_KEY_POWER,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 87) .desc = "power",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 88) .active_low = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 89) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 90) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 91)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 92) static struct gpio_keys_platform_data mv2120_button_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 93) .buttons = mv2120_buttons,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 94) .nbuttons = ARRAY_SIZE(mv2120_buttons),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 95) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 96)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 97) static struct platform_device mv2120_button_device = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 98) .name = "gpio-keys",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 99) .id = -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) .num_resources = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) .dev = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) .platform_data = &mv2120_button_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) /****************************************************************************
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) * General Setup
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) ****************************************************************************/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) static unsigned int mv2120_mpp_modes[] __initdata = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) MPP0_GPIO, /* Sys status LED */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) MPP1_GPIO, /* Sys error LED */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) MPP2_GPIO, /* OverTemp interrupt */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) MPP3_GPIO, /* RTC interrupt */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) MPP4_GPIO, /* V_LED 5V */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) MPP5_GPIO, /* V_LED 3.3V */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) MPP6_UNUSED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) MPP7_UNUSED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) MPP8_GPIO, /* SATA 0 fail LED */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) MPP9_GPIO, /* SATA 1 fail LED */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) MPP10_UNUSED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) MPP11_UNUSED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) MPP12_SATA_LED, /* SATA 0 presence */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) MPP13_SATA_LED, /* SATA 1 presence */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) MPP14_SATA_LED, /* SATA 0 active */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) MPP15_SATA_LED, /* SATA 1 active */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) MPP16_UNUSED,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) MPP17_GPIO, /* Reset button */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) MPP18_GPIO, /* Power button */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) MPP19_GPIO, /* Power off */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) static struct i2c_board_info __initdata mv2120_i2c_rtc = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) I2C_BOARD_INFO("pcf8563", 0x51),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) .irq = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) static struct gpio_led mv2120_led_pins[] = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) .name = "mv2120:blue:health",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) .gpio = 0,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) .name = "mv2120:red:health",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) .gpio = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) .name = "mv2120:led:bright",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) .gpio = 4,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) .default_trigger = "default-on",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) .name = "mv2120:led:dimmed",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) .gpio = 5,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) .name = "mv2120:red:sata0",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) .gpio = 8,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) .active_low = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) .name = "mv2120:red:sata1",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) .gpio = 9,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) .active_low = 1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) },
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) static struct gpio_led_platform_data mv2120_led_data = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) .leds = mv2120_led_pins,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) .num_leds = ARRAY_SIZE(mv2120_led_pins),
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) static struct platform_device mv2120_leds = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) .name = "leds-gpio",
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) .id = -1,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) .dev = {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) .platform_data = &mv2120_led_data,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) static void mv2120_power_off(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) pr_info("%s: triggering power-off...\n", __func__);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) gpio_set_value(MV2120_GPIO_POWER_OFF, 0);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) static void __init mv2120_init(void)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) /* Setup basic Orion functions. Need to be called early. */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) orion5x_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) orion5x_mpp_conf(mv2120_mpp_modes);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) * Configure peripherals.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) orion5x_ehci0_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) orion5x_ehci1_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) orion5x_eth_init(&mv2120_eth_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) orion5x_i2c_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) orion5x_sata_init(&mv2120_sata_data);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) orion5x_uart0_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) orion5x_xor_init();
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) mvebu_mbus_add_window_by_id(ORION_MBUS_DEVBUS_BOOT_TARGET,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) ORION_MBUS_DEVBUS_BOOT_ATTR,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) MV2120_NOR_BOOT_BASE,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) MV2120_NOR_BOOT_SIZE);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) platform_device_register(&mv2120_nor_flash);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) platform_device_register(&mv2120_button_device);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) if (gpio_request(MV2120_GPIO_RTC_IRQ, "rtc") == 0) {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) if (gpio_direction_input(MV2120_GPIO_RTC_IRQ) == 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) mv2120_i2c_rtc.irq = gpio_to_irq(MV2120_GPIO_RTC_IRQ);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) gpio_free(MV2120_GPIO_RTC_IRQ);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) i2c_register_board_info(0, &mv2120_i2c_rtc, 1);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) platform_device_register(&mv2120_leds);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) /* register mv2120 specific power-off method */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) if (gpio_request(MV2120_GPIO_POWER_OFF, "POWEROFF") != 0 ||
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) gpio_direction_output(MV2120_GPIO_POWER_OFF, 1) != 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) pr_err("mv2120: failed to setup power-off GPIO\n");
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) pm_power_off = mv2120_power_off;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) /* Warning: HP uses a wrong mach-type (=526) in their bootloader */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) MACHINE_START(MV2120, "HP Media Vault mv2120")
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) /* Maintainer: Martin Michlmayr <tbm@cyrius.com> */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) .atag_offset = 0x100,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) .nr_irqs = ORION5X_NR_IRQS,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) .init_machine = mv2120_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) .map_io = orion5x_map_io,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) .init_early = orion5x_init_early,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) .init_irq = orion5x_init_irq,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) .init_time = orion5x_timer_init,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) .fixup = tag_fixup_mem32,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) .restart = orion5x_restart,
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) MACHINE_END