summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-15 11:32:19 +0100
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2010-02-15 11:32:19 +0100
commit158aeade15595f75d6484ddb1346a8e7efd8050c (patch)
tree56ff044f604ed7190bca1754102ab7d14a3f5f49
parent5d5b4ca7cd2c968820dad2b0219456af24778974 (diff)
CCWMX51: Compilation and runtime issues for Linux-2.6.31
Fix compilation errors and warnings and initialize FEC ethernet driver. Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
-rw-r--r--arch/arm/Makefile2
-rw-r--r--arch/arm/mach-mx51/devices.c10
-rw-r--r--arch/arm/mach-mx51/mx51_ccwmx51js.c44
-rw-r--r--arch/arm/mach-mx51/mx51_ccwmx51js_pmic_mc13892.c3
-rw-r--r--arch/arm/mm/mmu.c7
-rw-r--r--arch/arm/plat-mxc/include/mach/mxc.h60
-rw-r--r--drivers/i2c/busses/mxc_i2c.c2
-rw-r--r--drivers/mtd/devices/Makefile3
-rw-r--r--drivers/mxc/ipu3/ipu_disp.c2
-rwxr-xr-xdrivers/video/mxc/ccwmx51_display.c2
10 files changed, 51 insertions, 84 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index d22dff606aac..c72dea498467 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -50,7 +50,7 @@ comma = ,
# Note that GCC does not numerically define an architecture version
# macro, but instead defines a whole series of macros which makes
# testing for a specific architecture or later rather impossible.
-arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7a,-march=armv5t -Wa$(comma)-march=armv7a)
+arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
# Only override the compiler option if ARMv6. The ARMv6K extensions are
# always available in ARMv7
diff --git a/arch/arm/mach-mx51/devices.c b/arch/arm/mach-mx51/devices.c
index b2a6c1dca3a1..9ce393286395 100644
--- a/arch/arm/mach-mx51/devices.c
+++ b/arch/arm/mach-mx51/devices.c
@@ -925,8 +925,8 @@ static inline void mxc_init_tve(void)
*/
static struct resource dvfs_core_resources[] = {
[0] = {
- .start = MXC_DVFS_CORE_BASE,
- .end = MXC_DVFS_CORE_BASE + 4 * SZ_16 - 1,
+ .start = (resource_size_t)MXC_DVFS_CORE_BASE,
+ .end = (resource_size_t) MXC_DVFS_CORE_BASE + 4 * SZ_16 - 1,
.flags = IORESOURCE_MEM,
},
[1] = {
@@ -943,9 +943,9 @@ struct mxc_dvfs_platform_data dvfs_core_data = {
.clk2_id = "gpc_dvfs_clk",
.gpc_cntr_reg_addr = MXC_GPC_CNTR,
.gpc_vcr_reg_addr = MXC_GPC_VCR,
- .ccm_cdcr_reg_addr = (unsigned int)MXC_CCM_CDCR,
- .ccm_cacrr_reg_addr = (unsigned int)MXC_CCM_CACRR,
- .ccm_cdhipr_reg_addr = (unsigned int)MXC_CCM_CDHIPR,
+ .ccm_cdcr_reg_addr = (void __iomem *)MXC_CCM_CDCR,
+ .ccm_cacrr_reg_addr = (void __iomem *)MXC_CCM_CACRR,
+ .ccm_cdhipr_reg_addr = (void __iomem *)MXC_CCM_CDHIPR,
.dvfs_thrs_reg_addr = MXC_DVFSTHRS,
.dvfs_coun_reg_addr = MXC_DVFSCOUN,
.dvfs_emac_reg_addr = MXC_DVFSEMAC,
diff --git a/arch/arm/mach-mx51/mx51_ccwmx51js.c b/arch/arm/mach-mx51/mx51_ccwmx51js.c
index ad93a4fc3c77..c3ca49fb5ec5 100644
--- a/arch/arm/mach-mx51/mx51_ccwmx51js.c
+++ b/arch/arm/mach-mx51/mx51_ccwmx51js.c
@@ -205,10 +205,10 @@ static void ccwmx51_init_ext_eth_mac(void)
printk(KERN_ERR "Unable to ioremap 0x%08x in %s\n", WEIM_BASE_ADDR, __func__);
return;
}
-
- /** Configure the CS timming, bus width, etc.
- * 16 bit on DATA[31..16], not multiplexed, async
- * RWSC=50, RADVA=2, RADVN=6, OEA=0, OEN=0, RCSA=0, RCSN=0, APR=0
+
+ /** Configure the CS timming, bus width, etc.
+ * 16 bit on DATA[31..16], not multiplexed, async
+ * RWSC=50, RADVA=2, RADVN=6, OEA=0, OEN=0, RCSA=0, RCSN=0, APR=0
* WAL=0, WBED=1, WWSC=50, WADVA=2, WADVN=6, WEA=0, WEN=0, WCSA=0
*/
__raw_writel(0x00420081, weim_vbaddr + 0x78 + CSGCR1);
@@ -231,9 +231,34 @@ static void ccwmx51_init_ext_eth_mac(void) { }
#if defined(CONFIG_FEC) || defined(CONFIG_FEC_MODULE)
-unsigned int expio_intr_fec;
+static struct resource mxc_fec_resources[] = {
+ {
+ .start = FEC_BASE_ADDR,
+ .end = FEC_BASE_ADDR + 0xfff,
+ .flags = IORESOURCE_MEM
+ }, {
+ .start = MXC_INT_FEC,
+ .end = MXC_INT_FEC,
+ .flags = IORESOURCE_IRQ
+ },
+};
+
+struct platform_device mxc_fec_device = {
+ .name = "fec",
+ .id = 0,
+ .num_resources = ARRAY_SIZE(mxc_fec_resources),
+ .resource = mxc_fec_resources,
+};
-EXPORT_SYMBOL(expio_intr_fec);
+static __init int mxc_init_fec(void)
+{
+ return platform_device_register(&mxc_fec_device);
+}
+#else
+static inline int mxc_init_fec(void)
+{
+ return 0;
+}
#endif
#if defined(CONFIG_MMC_IMX_ESDHCI) || defined(CONFIG_MMC_IMX_ESDHCI_MODULE)
@@ -557,10 +582,10 @@ static void __init mxc_board_init(void)
mxc_init_devices();
ccwmx51_init_mmc();
ccwmx51_init_nand_mtd();
+ mxc_init_fec();
// ccwmx51_init_ext_eth_mac();
ccwmx51_init_mma7455l();
ccwmx51_init_mc13892();
-
pm_power_off = mxc_power_off;
}
@@ -573,8 +598,7 @@ static void __init ccwmx51_timer_init(void)
cpu_wp_auto[2].cpu_voltage = 1000000;
}
- mxc_clocks_init(32768, 24000000, 22579200, 24576000);
- mxc_timer_init("gpt_clk.0");
+ mx51_clocks_init(32768, 24000000, 22579200, 24576000);
}
static struct sys_timer mxc_timer = {
@@ -587,7 +611,7 @@ MACHINE_START(CCWMX51JS, "ConnectCore Wi-MX51 on a JSK board")
.io_pg_offst = ((AIPS1_BASE_ADDR_VIRT) >> 18) & 0xfffc,
.boot_params = PHYS_OFFSET + 0x100,
.fixup = fixup_mxc_board,
- .map_io = mxc_map_io,
+ .map_io = mx51_map_io,
.init_irq = mxc_init_irq,
.init_machine = mxc_board_init,
.timer = &mxc_timer,
diff --git a/arch/arm/mach-mx51/mx51_ccwmx51js_pmic_mc13892.c b/arch/arm/mach-mx51/mx51_ccwmx51js_pmic_mc13892.c
index f650724871ea..2d7421f813d4 100644
--- a/arch/arm/mach-mx51/mx51_ccwmx51js_pmic_mc13892.c
+++ b/arch/arm/mach-mx51/mx51_ccwmx51js_pmic_mc13892.c
@@ -21,6 +21,7 @@
#include <linux/regulator/machine.h>
#include <linux/mfd/mc13892/core.h>
#include "iomux.h"
+#include <mach/irqs.h>
/*
* Convenience conversion.
@@ -287,7 +288,7 @@ static struct regulator_init_data gpo4_init = {
static int mc13892_regulator_init(struct mc13892 *mc13892)
{
unsigned int value, register_mask;
- printk("Initializing regulators for Babbage.\n");
+ printk("Initializing regulators for CCWMX51.\n");
if (mxc_cpu_is_rev(CHIP_REV_2_0) < 0)
sw2_init.constraints.state_mem.uV = 1100000;
else if (mxc_cpu_is_rev(CHIP_REV_2_0) == 1) {
diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4426ee67ceca..892a3e023e6d 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -204,7 +204,7 @@ static struct mem_type mem_types[] = {
.prot_l1 = PMD_TYPE_TABLE,
.prot_sect = PROT_SECT_DEVICE | PMD_SECT_WB,
.domain = DOMAIN_IO,
- },
+ },
[MT_DEVICE_WC] = { /* ioremap_wc */
.prot_pte = PROT_PTE_DEVICE | L_PTE_MT_DEV_WC,
.prot_l1 = PMD_TYPE_TABLE,
@@ -687,7 +687,10 @@ __early_param("vmalloc=", early_vmalloc);
static void __init sanity_check_meminfo(void)
{
- int i, j, highmem = 0;
+ int i, j = 0;
+#ifdef CONFIG_HIGHMEM
+ int highmem = 0;
+#endif
for (i = 0, j = 0; i < meminfo.nr_banks; i++) {
struct membank *bank = &meminfo.bank[j];
diff --git a/arch/arm/plat-mxc/include/mach/mxc.h b/arch/arm/plat-mxc/include/mach/mxc.h
index 34031aebed98..ec58f34b6532 100644
--- a/arch/arm/plat-mxc/include/mach/mxc.h
+++ b/arch/arm/plat-mxc/include/mach/mxc.h
@@ -298,66 +298,6 @@ struct ccwmx51_lcd_pdata {
void (*bl_enable) (int);
};
-struct mxc_dvfs_platform_data {
- /** Supply voltage regulator name string */
- char *reg_id;
- /* CPU clock name string */
- char *clk1_id;
- /* DVFS clock name string */
- char *clk2_id;
- /* GPC control reg address */
- unsigned int gpc_cntr_reg_addr;
- /* GPC voltage counter reg address */
- unsigned int gpc_vcr_reg_addr;
- /* CCM DVFS control reg address */
- unsigned int ccm_cdcr_reg_addr;
- /* CCM ARM clock root reg address */
- unsigned int ccm_cacrr_reg_addr;
- /* CCM divider handshake in-progree reg address */
- unsigned int ccm_cdhipr_reg_addr;
- /* DVFS threshold reg address */
- unsigned int dvfs_thrs_reg_addr;
- /* DVFS counters reg address */
- unsigned int dvfs_coun_reg_addr;
- /* DVFS EMAC reg address */
- unsigned int dvfs_emac_reg_addr;
- /* DVFS control reg address */
- unsigned int dvfs_cntr_reg_addr;
- /* PREDIV mask */
- u32 prediv_mask;
- /* PREDIV offset */
- int prediv_offset;
- /* PREDIV value */
- int prediv_val;
- /* DIV3CK mask */
- u32 div3ck_mask;
- /* DIV3CK offset */
- int div3ck_offset;
- /* DIV3CK value */
- int div3ck_val;
- /* EMAC value */
- int emac_val;
- /* Frequency increase threshold. Increase frequency change request
- will be sent if DVFS counter value will be more than this value */
- int upthr_val;
- /* Frequency decrease threshold. Decrease frequency change request
- will be sent if DVFS counter value will be less than this value */
- int dnthr_val;
- /* Panic threshold. Panic frequency change request
- will be sent if DVFS counter value will be more than this value */
- int pncthr_val;
- /* The amount of times the up threshold should be exceeded
- before DVFS will trigger frequency increase request */
- int upcnt_val;
- /* The amount of times the down threshold should be exceeded
- before DVFS will trigger frequency decrease request */
- int dncnt_val;
- /* Delay time in us */
- int delay_time;
- /* Number of woking points supported */
- int num_wp;
-};
-
struct mxc_tsc_platform_data {
char *vdd_reg;
int penup_threshold;
diff --git a/drivers/i2c/busses/mxc_i2c.c b/drivers/i2c/busses/mxc_i2c.c
index 655be65d0810..157695402819 100644
--- a/drivers/i2c/busses/mxc_i2c.c
+++ b/drivers/i2c/busses/mxc_i2c.c
@@ -261,7 +261,7 @@ static int mxc_i2c_repstart(mxc_i2c_device *dev, struct i2c_msg *msg)
}
if (retry <= 0) {
dev_err(&dev->adap.dev, "Could not grab Bus ownership\n");
- return;
+ return -1;
}
writew(addr_trans, dev->membase + MXC_I2DR);
return 0;
diff --git a/drivers/mtd/devices/Makefile b/drivers/mtd/devices/Makefile
index a817da093b2a..98a95aa875c0 100644
--- a/drivers/mtd/devices/Makefile
+++ b/drivers/mtd/devices/Makefile
@@ -16,7 +16,4 @@ obj-$(CONFIG_MTD_LART) += lart.o
obj-$(CONFIG_MTD_BLOCK2MTD) += block2mtd.o
obj-$(CONFIG_MTD_DATAFLASH) += mtd_dataflash.o
obj-$(CONFIG_MTD_M25P80) += m25p80.o
-<<<<<<< HEAD:drivers/mtd/devices/Makefile
obj-$(CONFIG_MTD_MXC_DATAFLASH) += mxc_dataflash.o
-=======
->>>>>>> Revert "ENGR00114157-1 Add SPI data flash driver support":drivers/mtd/devices/Makefile
diff --git a/drivers/mxc/ipu3/ipu_disp.c b/drivers/mxc/ipu3/ipu_disp.c
index d7cc2107046e..12dbacdc12b9 100644
--- a/drivers/mxc/ipu3/ipu_disp.c
+++ b/drivers/mxc/ipu3/ipu_disp.c
@@ -956,7 +956,7 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
if ((v_sync_width == 0) || (h_sync_width == 0))
return EINVAL;
- adapt_panel_to_ipu_restricitions(&pixel_clk, width, height,
+ adapt_panel_to_ipu_restricitions((uint16_t *)&pixel_clk, width, height,
h_start_width, h_end_width,
v_start_width, &v_end_width);
h_total = width + h_sync_width + h_start_width + h_end_width;
diff --git a/drivers/video/mxc/ccwmx51_display.c b/drivers/video/mxc/ccwmx51_display.c
index 4ee5d5902fb9..a4912cace5e1 100755
--- a/drivers/video/mxc/ccwmx51_display.c
+++ b/drivers/video/mxc/ccwmx51_display.c
@@ -19,6 +19,8 @@
#include <linux/init.h>
#include <linux/platform_device.h>
#include <linux/mxcfb.h>
+#include <mach/hardware.h>
+#include <mach/mxc.h>
static void lcd_poweron(struct ccwmx51_lcd_pdata *plat);
static void lcd_poweroff(struct ccwmx51_lcd_pdata *plat);