diff options
author | Richard Zhu <r65037@freescale.com> | 2008-03-10 16:33:25 +0800 |
---|---|---|
committer | Daniel Schaeffer <daniel.schaeffer@timesys.com> | 2008-08-25 15:20:42 -0400 |
commit | 1958906d7cd96fb8b81ab6db37803b5fcdef44af (patch) | |
tree | ab6e751d76232c3ec8aeecd19bfed3bb130fe708 /arch | |
parent | 1be1badb1ee898e960fb3dd309c830d44a3b8eff (diff) |
ENGR00064733 3DS ATA Power Management Support
Support ATA power management in 3DS board
Signed-off-by: Richard Zhu <r65037@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/imx27ads_defconfig | 10 | ||||
-rw-r--r-- | arch/arm/configs/imx31_3stack_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/configs/imx31ads_defconfig | 2 | ||||
-rw-r--r-- | arch/arm/mach-mx27/mx27ads.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx31ads.c | 32 | ||||
-rw-r--r-- | arch/arm/mach-mx3/mx3_3stack.c | 30 |
6 files changed, 99 insertions, 9 deletions
diff --git a/arch/arm/configs/imx27ads_defconfig b/arch/arm/configs/imx27ads_defconfig index 3c0f9a8d4bd4..40acda6c3629 100644 --- a/arch/arm/configs/imx27ads_defconfig +++ b/arch/arm/configs/imx27ads_defconfig @@ -553,15 +553,15 @@ CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 # CONFIG_ATA_OVER_ETH is not set CONFIG_MISC_DEVICES=y # CONFIG_EEPROM_93CX6 is not set -CONFIG_IDE=y +CONFIG_IDE=m CONFIG_IDE_MAX_HWIFS=4 -CONFIG_BLK_DEV_IDE=y +CONFIG_BLK_DEV_IDE=m # # Please see Documentation/ide.txt for help/info on IDE drives # # CONFIG_BLK_DEV_IDE_SATA is not set -CONFIG_BLK_DEV_IDEDISK=y +CONFIG_BLK_DEV_IDEDISK=m # CONFIG_IDEDISK_MULTI_MODE is not set # CONFIG_BLK_DEV_IDECD is not set # CONFIG_BLK_DEV_IDETAPE is not set @@ -573,10 +573,10 @@ CONFIG_IDE_PROC_FS=y # # IDE chipset support/bugfixes # -CONFIG_IDE_GENERIC=y +CONFIG_IDE_GENERIC=m # CONFIG_BLK_DEV_PLATFORM is not set # CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDE_MXC is not set +CONFIG_BLK_DEV_IDE_MXC=m # # Other IDE chipsets support diff --git a/arch/arm/configs/imx31_3stack_defconfig b/arch/arm/configs/imx31_3stack_defconfig index 3fae2b6b9497..ffe82886e259 100644 --- a/arch/arm/configs/imx31_3stack_defconfig +++ b/arch/arm/configs/imx31_3stack_defconfig @@ -521,7 +521,7 @@ CONFIG_IDE_PROC_FS=y CONFIG_IDE_GENERIC=m # CONFIG_BLK_DEV_PLATFORM is not set # CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDE_MXC is not set +CONFIG_BLK_DEV_IDE_MXC=m # # Other IDE chipsets support diff --git a/arch/arm/configs/imx31ads_defconfig b/arch/arm/configs/imx31ads_defconfig index 5e7cee3d77c4..4127cd248089 100644 --- a/arch/arm/configs/imx31ads_defconfig +++ b/arch/arm/configs/imx31ads_defconfig @@ -602,7 +602,7 @@ CONFIG_IDE_PROC_FS=y CONFIG_IDE_GENERIC=m # CONFIG_BLK_DEV_PLATFORM is not set # CONFIG_IDE_ARM is not set -# CONFIG_BLK_DEV_IDE_MXC is not set +CONFIG_BLK_DEV_IDE_MXC=m # # Other IDE chipsets support diff --git a/arch/arm/mach-mx27/mx27ads.c b/arch/arm/mach-mx27/mx27ads.c index 9e8db2916c08..0fdca14dfe3d 100644 --- a/arch/arm/mach-mx27/mx27ads.c +++ b/arch/arm/mach-mx27/mx27ads.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2000 Deep Blue Solutions Ltd * Copyright (C) 2002 Shane Nay (shane@minirl.com) - * Copyright 2006-2007 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2006-2008 Freescale Semiconductor, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -719,6 +719,35 @@ static void __inline mxc_init_pmic_audio(void) } #endif +/* IDE device data */ +#if defined(CONFIG_BLK_DEV_IDE_MXC) || defined(CONFIG_BLK_DEV_IDE_MXC_MODULE) + +/*! Platform Data for MXC IDE */ +static struct mxc_ide_platform_data mxc_ide_data = { + .power_drive = NULL, + .power_io = NULL, +}; + +static struct platform_device mxc_ide_device = { + .name = "mxc_ide", + .id = 0, + .dev = { + .release = mxc_nop_release, + .platform_data = &mxc_ide_data, + }, +}; + +static inline void mxc_init_ide(void) +{ + if (platform_device_register(&mxc_ide_device) < 0) + printk(KERN_ERR "Error: Registering the ide.\n"); +} +#else +static inline void mxc_init_ide(void) +{ +} +#endif + static __init void mxc_board_init(void) { pr_info("AIPI VA base: 0x%x\n", IO_ADDRESS(AIPI_BASE_ADDR)); @@ -744,6 +773,7 @@ static __init void mxc_board_init(void) mxc_init_fb(); mxc_init_bl(); + mxc_init_ide(); } static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags, diff --git a/arch/arm/mach-mx3/mx31ads.c b/arch/arm/mach-mx3/mx31ads.c index f733022e8454..7a8cd61fc80f 100644 --- a/arch/arm/mach-mx3/mx31ads.c +++ b/arch/arm/mach-mx3/mx31ads.c @@ -1,7 +1,7 @@ /* * Copyright (C) 2000 Deep Blue Solutions Ltd * Copyright (C) 2002 Shane Nay (shane@minirl.com) - * Copyright 2005-2007 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2005-2008 Freescale Semiconductor, Inc. All Rights Reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -658,6 +658,35 @@ static void __inline mxc_init_pmic_audio(void) } #endif +/* IDE device data */ +#if defined(CONFIG_BLK_DEV_IDE_MXC) || defined(CONFIG_BLK_DEV_IDE_MXC_MODULE) + +/*! Platform Data for MXC IDE */ +static struct mxc_ide_platform_data mxc_ide_data = { + .power_drive = NULL, + .power_io = NULL, +}; + +static struct platform_device mxc_ide_device = { + .name = "mxc_ide", + .id = 0, + .dev = { + .release = mxc_nop_release, + .platform_data = &mxc_ide_data, + }, +}; + +static inline void mxc_init_ide(void) +{ + if (platform_device_register(&mxc_ide_device) < 0) + printk(KERN_ERR "Error: Registering the ide.\n"); +} +#else +static inline void mxc_init_ide(void) +{ +} +#endif + /*! * Board specific initialization. */ @@ -681,6 +710,7 @@ static void __init mxc_board_init(void) mxc_init_fb(); mxc_init_bl(); mxc_init_ir(); + mxc_init_ide(); } #define PLL_PCTL_REG(pd, mfd, mfi, mfn) \ diff --git a/arch/arm/mach-mx3/mx3_3stack.c b/arch/arm/mach-mx3/mx3_3stack.c index 819573a07630..b85bb416ddb1 100644 --- a/arch/arm/mach-mx3/mx3_3stack.c +++ b/arch/arm/mach-mx3/mx3_3stack.c @@ -546,6 +546,35 @@ static void __init fixup_mxc_board(struct machine_desc *desc, struct tag *tags, #endif } +/* IDE device data */ +#if defined(CONFIG_BLK_DEV_IDE_MXC) || defined(CONFIG_BLK_DEV_IDE_MXC_MODULE) + +/*! Platform Data for MXC IDE */ +static struct mxc_ide_platform_data mxc_ide_data = { + .power_drive = "GPO2", + .power_io = "GPO3", +}; + +static struct platform_device mxc_ide_device = { + .name = "mxc_ide", + .id = 0, + .dev = { + .release = mxc_nop_release, + .platform_data = &mxc_ide_data, + }, +}; + +static inline void mxc_init_ide(void) +{ + if (platform_device_register(&mxc_ide_device) < 0) + printk(KERN_ERR "Error: Registering the ide.\n"); +} +#else +static inline void mxc_init_ide(void) +{ +} +#endif + /*! * Board specific initialization. */ @@ -584,6 +613,7 @@ static void __init mxc_board_init(void) mxc_init_fb(); mxc_init_bl(); + mxc_init_ide(); } #define PLL_PCTL_REG(pd, mfd, mfi, mfn) \ |