Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172501
b: refs/heads/master
c: 654166d
h: refs/heads/master
i:
  172499: 02a6f6c
v: v3
  • Loading branch information
Sascha Hauer committed Nov 24, 2009
1 parent a85d98e commit f97961c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 51 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: c6e7c0e20d0ece2825389f5e24684490a440c427
refs/heads/master: 654166d6879ed1e4df9815d04e6a358adf1259a6
17 changes: 1 addition & 16 deletions trunk/arch/arm/plat-mxc/include/mach/iomux-v3.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,7 @@ struct pad_desc {
#define PAD_CTL_SRE_FAST (1 << 0)

/*
* setups a single pad:
* - reserves the pad so that it is not claimed by another driver
* - setups the iomux according to the configuration
* setups a single pad in the iomuxer
*/
int mxc_iomux_v3_setup_pad(struct pad_desc *pad);

Expand All @@ -100,19 +98,6 @@ int mxc_iomux_v3_setup_pad(struct pad_desc *pad);
*/
int mxc_iomux_v3_setup_multiple_pads(struct pad_desc *pad_list, unsigned count);

/*
* releases a single pad:
* - make it available for a future use by another driver
* - DOES NOT reconfigure the IOMUX in its reset state
*/
void mxc_iomux_v3_release_pad(struct pad_desc *pad);

/*
* releases multiple pads
* convenvient way to call the above function with tables
*/
void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count);

/*
* Initialise the iomux controller
*/
Expand Down
36 changes: 2 additions & 34 deletions trunk/arch/arm/plat-mxc/iomux-v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,11 @@

static void __iomem *base;

static unsigned long iomux_v3_pad_alloc_map[0x200 / BITS_PER_LONG];

/*
* setups a single pin:
* - reserves the pin so that it is not claimed by another driver
* - setups the iomux according to the configuration
* setups a single pad in the iomuxer
*/
int mxc_iomux_v3_setup_pad(struct pad_desc *pad)
{
unsigned int pad_ofs = pad->pad_ctrl_ofs;

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, base + pad->mux_ctrl_ofs);

Expand All @@ -66,37 +58,13 @@ int mxc_iomux_v3_setup_multiple_pads(struct pad_desc *pad_list, unsigned count)
for (i = 0; i < count; i++) {
ret = mxc_iomux_v3_setup_pad(p);
if (ret)
goto setup_error;
return ret;
p++;
}
return 0;

setup_error:
mxc_iomux_v3_release_multiple_pads(pad_list, i);
return ret;
}
EXPORT_SYMBOL(mxc_iomux_v3_setup_multiple_pads);

void mxc_iomux_v3_release_pad(struct pad_desc *pad)
{
unsigned int pad_ofs = pad->pad_ctrl_ofs;

clear_bit(pad_ofs >> 2, iomux_v3_pad_alloc_map);
}
EXPORT_SYMBOL(mxc_iomux_v3_release_pad);

void mxc_iomux_v3_release_multiple_pads(struct pad_desc *pad_list, int count)
{
struct pad_desc *p = pad_list;
int i;

for (i = 0; i < count; i++) {
mxc_iomux_v3_release_pad(p);
p++;
}
}
EXPORT_SYMBOL(mxc_iomux_v3_release_multiple_pads);

void mxc_iomux_v3_init(void __iomem *iomux_v3_base)
{
base = iomux_v3_base;
Expand Down

0 comments on commit f97961c

Please sign in to comment.