Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 160876
b: refs/heads/master
c: 6134b2c
h: refs/heads/master
v: v3
  • Loading branch information
Sascha Hauer committed Aug 14, 2009
1 parent 1dfb222 commit 970fa8f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fc2a9f0bc7f6dd4966dc57fb98b8697c83b6d035
refs/heads/master: 6134b2cbb0e24f897fd1063745638397809fca29
2 changes: 2 additions & 0 deletions trunk/arch/arm/mach-mx3/mm.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <mach/common.h>
#include <mach/hardware.h>
#include <mach/iomux-v3.h>

/*!
* @file mm.c
Expand Down Expand Up @@ -83,6 +84,7 @@ void __init mx31_map_io(void)
void __init mx35_map_io(void)
{
mxc_set_cpu_type(MXC_CPU_MX35);
mxc_iomux_v3_init(IO_ADDRESS(IOMUXC_BASE_ADDR));
mxc_arch_reset_init(IO_ADDRESS(WDOG_BASE_ADDR));

iotable_init(mxc_io_desc, ARRAY_SIZE(mxc_io_desc));
Expand Down
5 changes: 5 additions & 0 deletions trunk/arch/arm/plat-mxc/include/mach/iomux-v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,10 @@ void mxc_iomux_v3_release_pad(struct pad_desc *pad);
*/
void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count);

/*
* Initialise the iomux controller
*/
void mxc_iomux_v3_init(void __iomem *iomux_v3_base);

#endif /* __MACH_IOMUX_V3_H__*/

15 changes: 10 additions & 5 deletions trunk/arch/arm/plat-mxc/iomux-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <asm/mach/map.h>
#include <mach/iomux-v3.h>

#define IOMUX_BASE IO_ADDRESS(IOMUXC_BASE_ADDR)
static void __iomem *base;

static unsigned long iomux_v3_pad_alloc_map[0x200 / BITS_PER_LONG];

Expand All @@ -45,14 +45,14 @@ int mxc_iomux_v3_setup_pad(struct pad_desc *pad)
if (test_and_set_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map))
return -EBUSY;
if (pad->mux_ctrl_ofs)
__raw_writel(pad->mux_mode, IOMUX_BASE + pad->mux_ctrl_ofs);
__raw_writel(pad->mux_mode, base + pad->mux_ctrl_ofs);

if (pad->select_input_ofs)
__raw_writel(pad->select_input,
IOMUX_BASE + pad->select_input_ofs);
base + pad->select_input_ofs);

if (!(pad->pad_ctrl & NO_PAD_CTRL))
__raw_writel(pad->pad_ctrl, IOMUX_BASE + pad->pad_ctrl_ofs);
if (!(pad->pad_ctrl & NO_PAD_CTRL) && pad->pad_ctrl_ofs)
__raw_writel(pad->pad_ctrl, base + pad->pad_ctrl_ofs);
return 0;
}
EXPORT_SYMBOL(mxc_iomux_v3_setup_pad);
Expand Down Expand Up @@ -96,3 +96,8 @@ void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count)
}
}
EXPORT_SYMBOL(mxc_iomux_v3_release_multiple_pads);

void mxc_iomux_v3_init(void __iomem *iomux_v3_base)
{
base = iomux_v3_base;
}

0 comments on commit 970fa8f

Please sign in to comment.