2009-12-03 13:16:33 +00:00
|
|
|
/*
|
|
|
|
* 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 the Free Software Foundation; either version 2 of
|
|
|
|
* the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2011-07-27 10:37:16 +00:00
|
|
|
#include <init.h>
|
|
|
|
#include <sizes.h>
|
2012-09-23 19:55:46 +00:00
|
|
|
#include <io.h>
|
2012-10-11 07:09:29 +00:00
|
|
|
#include <mach/imx31-regs.h>
|
2012-09-23 19:55:46 +00:00
|
|
|
#include <mach/weim.h>
|
|
|
|
|
|
|
|
void imx31_setup_weimcs(size_t cs, unsigned upper, unsigned lower,
|
|
|
|
unsigned additional)
|
|
|
|
{
|
|
|
|
writel(upper, MX31_WEIM_BASE_ADDR + (cs * 0x10) + 0x0);
|
|
|
|
writel(lower, MX31_WEIM_BASE_ADDR + (cs * 0x10) + 0x4);
|
|
|
|
writel(additional, MX31_WEIM_BASE_ADDR + (cs * 0x10) + 0x8);
|
|
|
|
}
|
2009-12-03 13:16:33 +00:00
|
|
|
|
2011-07-27 10:37:16 +00:00
|
|
|
static int imx31_init(void)
|
|
|
|
{
|
2012-09-22 10:46:45 +00:00
|
|
|
add_generic_device("imx_iim", 0, NULL, MX31_IIM_BASE_ADDR, SZ_4K,
|
2011-07-27 10:37:16 +00:00
|
|
|
IORESOURCE_MEM, NULL);
|
|
|
|
|
2012-09-30 15:40:45 +00:00
|
|
|
add_generic_device("imx31-iomux", 0, NULL, MX31_IOMUXC_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
2012-09-22 10:47:50 +00:00
|
|
|
add_generic_device("imx31-ccm", 0, NULL, MX31_CCM_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
2012-09-22 10:46:45 +00:00
|
|
|
add_generic_device("imx31-gpt", 0, NULL, MX31_GPT1_BASE_ADDR, 0x100, IORESOURCE_MEM, NULL);
|
2012-12-11 11:11:34 +00:00
|
|
|
add_generic_device("imx31-gpio", 0, NULL, MX31_GPIO1_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
|
|
|
add_generic_device("imx31-gpio", 1, NULL, MX31_GPIO2_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
|
|
|
add_generic_device("imx31-gpio", 2, NULL, MX31_GPIO3_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
2012-10-05 09:36:56 +00:00
|
|
|
add_generic_device("imx21-wdt", 0, NULL, MX31_WDOG_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
2012-11-27 15:47:36 +00:00
|
|
|
add_generic_device("imx31-esdctl", 0, NULL, MX31_ESDCTL_BASE_ADDR, 0x1000, IORESOURCE_MEM, NULL);
|
2012-12-13 16:51:15 +00:00
|
|
|
add_generic_device("imx31-usb-misc", 0, NULL, MX31_USB_OTG_BASE_ADDR + 0x600, 0x100, IORESOURCE_MEM, NULL);
|
2012-09-03 08:18:09 +00:00
|
|
|
|
2011-07-27 10:37:16 +00:00
|
|
|
return 0;
|
|
|
|
}
|
2012-09-22 10:47:50 +00:00
|
|
|
postcore_initcall(imx31_init);
|