diff options
author | Victor Kamensky <victor.kamensky@linaro.org> | 2014-04-15 13:37:46 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-05-08 10:09:53 -0400 |
commit | edfaf05c2fcb853fcf35f12aeb9c340f5913337f (patch) | |
tree | f3d0d7ca941855237953f65680932a8a433b0ed4 /arch/arm/mach-omap2/vc.c | |
parent | 89ca3b881987f5a4be4c5dbaa7f0df12bbdde2fd (diff) |
ARM: OMAP2+: raw read and write endian fix
All OMAP IP blocks expect LE data, but CPU may operate in BE mode.
Need to use endian neutral functions to read/write h/w registers.
I.e instead of __raw_read[lw] and __raw_write[lw] functions code
need to use read[lw]_relaxed and write[lw]_relaxed functions.
If the first simply reads/writes register, the second will byteswap
it if host operates in BE mode.
Changes are trivial sed like replacement of __raw_xxx functions
with xxx_relaxed variant.
Signed-off-by: Victor Kamensky <victor.kamensky@linaro.org>
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/vc.c')
-rw-r--r-- | arch/arm/mach-omap2/vc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c index 49ac7977e03e..267f204559c3 100644 --- a/arch/arm/mach-omap2/vc.c +++ b/arch/arm/mach-omap2/vc.c | |||
@@ -462,7 +462,7 @@ static void omap4_set_timings(struct voltagedomain *voltdm, bool off_mode) | |||
462 | val |= omap4_usec_to_val_scrm(tshut, OMAP4_DOWNTIME_SHIFT, | 462 | val |= omap4_usec_to_val_scrm(tshut, OMAP4_DOWNTIME_SHIFT, |
463 | OMAP4_DOWNTIME_MASK); | 463 | OMAP4_DOWNTIME_MASK); |
464 | 464 | ||
465 | __raw_writel(val, OMAP4_SCRM_CLKSETUPTIME); | 465 | writel_relaxed(val, OMAP4_SCRM_CLKSETUPTIME); |
466 | } | 466 | } |
467 | 467 | ||
468 | /* OMAP4 specific voltage init functions */ | 468 | /* OMAP4 specific voltage init functions */ |
@@ -584,7 +584,7 @@ static void __init omap4_vc_i2c_timing_init(struct voltagedomain *voltdm) | |||
584 | val = i2c_data->loadbits << 25 | i2c_data->loadbits << 29; | 584 | val = i2c_data->loadbits << 25 | i2c_data->loadbits << 29; |
585 | 585 | ||
586 | /* Write to SYSCTRL_PADCONF_WKUP_CTRL_I2C_2 to setup I2C pull */ | 586 | /* Write to SYSCTRL_PADCONF_WKUP_CTRL_I2C_2 to setup I2C pull */ |
587 | __raw_writel(val, OMAP2_L4_IO_ADDRESS(OMAP4_CTRL_MODULE_PAD_WKUP + | 587 | writel_relaxed(val, OMAP2_L4_IO_ADDRESS(OMAP4_CTRL_MODULE_PAD_WKUP + |
588 | OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2)); | 588 | OMAP4_CTRL_MODULE_PAD_WKUP_CONTROL_I2C_2)); |
589 | 589 | ||
590 | /* HSSCLH can always be zero */ | 590 | /* HSSCLH can always be zero */ |