* [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
@ 2011-03-15 13:58 ` Manjunath Hadli
0 siblings, 0 replies; 8+ messages in thread
From: Manjunath Hadli @ 2011-03-15 13:58 UTC (permalink / raw)
To: LMML, Kevin Hilman, LAK, Sekhar Nori
Cc: dlos, Mauro Carvalho Chehab, Hans Verkuil, Manjunath Hadli
Current devices.c file has a number of instances where
IO_ADDRESS() is used for system module register
access. Eliminate this in favor of a ioremap()
based access.
Consequent to this, a new global pointer davinci_sysmodbase
has been introduced which gets initialized during
the initialization of each relevant SoC.
In this patch davinci_sysmodbase is used by davinci_setup_mmc
but the later patches in the series use the same in different
places using DAVINCI_SYSMODULE_VIRT.This patch lays the
foundation for that.
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
---
arch/arm/mach-davinci/devices.c | 23 ++++++++++++++---------
arch/arm/mach-davinci/dm355.c | 1 +
arch/arm/mach-davinci/dm365.c | 1 +
arch/arm/mach-davinci/dm644x.c | 1 +
arch/arm/mach-davinci/dm646x.c | 1 +
arch/arm/mach-davinci/include/mach/hardware.h | 6 ++++++
6 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index d3b2040..b7ef950 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -33,6 +33,14 @@
#define DM365_MMCSD0_BASE 0x01D11000
#define DM365_MMCSD1_BASE 0x01D00000
+void __iomem *davinci_sysmodbase;
+
+void davinci_map_sysmod(void)
+{
+ davinci_sysmodbase = ioremap_nocache(DAVINCI_SYSTEM_MODULE_BASE, 0x800);
+ WARN_ON(!davinci_sysmodbase);
+}
+
static struct resource i2c_resources[] = {
{
.start = DAVINCI_I2C_BASE,
@@ -210,12 +218,12 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
davinci_cfg_reg(DM355_SD1_DATA2);
davinci_cfg_reg(DM355_SD1_DATA3);
} else if (cpu_is_davinci_dm365()) {
- void __iomem *pupdctl1 =
- IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE + 0x7c);
-
/* Configure pull down control */
- __raw_writel((__raw_readl(pupdctl1) & ~0xfc0),
- pupdctl1);
+ void __iomem *pupdctl1 = DAVINCI_SYSMODULE_VIRT(0x7c);
+ unsigned v;
+
+ v = __raw_readl(pupdctl1);
+ __raw_writel(v & ~0xfc0, pupdctl1);
mmcsd1_resources[0].start = DM365_MMCSD1_BASE;
mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
@@ -244,11 +252,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
} else if (cpu_is_davinci_dm644x()) {
/* REVISIT: should this be in board-init code? */
- void __iomem *base =
- IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE);
-
/* Power-on 3.3V IO cells */
- __raw_writel(0, base + DM64XX_VDD3P3V_PWDN);
+ writel(0, DAVINCI_SYSMODULE_VIRT(DM64XX_VDD3P3V_PWDN));
/*Set up the pull regiter for MMC */
davinci_cfg_reg(DM644X_MSTK);
}
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index a5f8a80..1baab94 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -874,6 +874,7 @@ void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata)
void __init dm355_init(void)
{
davinci_common_init(&davinci_soc_info_dm355);
+ davinci_map_sysmod();
}
static int __init dm355_init_devices(void)
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 02d2cc3..a788980 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -1127,6 +1127,7 @@ void __init dm365_init_rtc(void)
void __init dm365_init(void)
{
davinci_common_init(&davinci_soc_info_dm365);
+ davinci_map_sysmod();
}
static struct resource dm365_vpss_resources[] = {
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 9a2376b..77dea11 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -779,6 +779,7 @@ void __init dm644x_init_asp(struct snd_platform_data *pdata)
void __init dm644x_init(void)
{
davinci_common_init(&davinci_soc_info_dm644x);
+ davinci_map_sysmod();
}
static int __init dm644x_init_devices(void)
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 1e0f809..ce93b83 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -903,6 +903,7 @@ void __init dm646x_init(void)
{
dm646x_board_setup_refclk(&ref_clk);
davinci_common_init(&davinci_soc_info_dm646x);
+ davinci_map_sysmod();
}
static int __init dm646x_init_devices(void)
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h
index 414e0b9..5296025 100644
--- a/arch/arm/mach-davinci/include/mach/hardware.h
+++ b/arch/arm/mach-davinci/include/mach/hardware.h
@@ -21,6 +21,12 @@
*/
#define DAVINCI_SYSTEM_MODULE_BASE 0x01C40000
+#ifndef __ASSEMBLER__
+extern void __iomem *davinci_sysmodbase;
+#define DAVINCI_SYSMODULE_VIRT(x) (davinci_sysmodbase + (x))
+void davinci_map_sysmod(void);
+#endif
+
/*
* I/O mapping
*/
--
1.6.2.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
@ 2011-03-15 13:58 ` Manjunath Hadli
0 siblings, 0 replies; 8+ messages in thread
From: Manjunath Hadli @ 2011-03-15 13:58 UTC (permalink / raw)
To: linux-arm-kernel
Current devices.c file has a number of instances where
IO_ADDRESS() is used for system module register
access. Eliminate this in favor of a ioremap()
based access.
Consequent to this, a new global pointer davinci_sysmodbase
has been introduced which gets initialized during
the initialization of each relevant SoC.
In this patch davinci_sysmodbase is used by davinci_setup_mmc
but the later patches in the series use the same in different
places using DAVINCI_SYSMODULE_VIRT.This patch lays the
foundation for that.
Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
---
arch/arm/mach-davinci/devices.c | 23 ++++++++++++++---------
arch/arm/mach-davinci/dm355.c | 1 +
arch/arm/mach-davinci/dm365.c | 1 +
arch/arm/mach-davinci/dm644x.c | 1 +
arch/arm/mach-davinci/dm646x.c | 1 +
arch/arm/mach-davinci/include/mach/hardware.h | 6 ++++++
6 files changed, 24 insertions(+), 9 deletions(-)
diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
index d3b2040..b7ef950 100644
--- a/arch/arm/mach-davinci/devices.c
+++ b/arch/arm/mach-davinci/devices.c
@@ -33,6 +33,14 @@
#define DM365_MMCSD0_BASE 0x01D11000
#define DM365_MMCSD1_BASE 0x01D00000
+void __iomem *davinci_sysmodbase;
+
+void davinci_map_sysmod(void)
+{
+ davinci_sysmodbase = ioremap_nocache(DAVINCI_SYSTEM_MODULE_BASE, 0x800);
+ WARN_ON(!davinci_sysmodbase);
+}
+
static struct resource i2c_resources[] = {
{
.start = DAVINCI_I2C_BASE,
@@ -210,12 +218,12 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
davinci_cfg_reg(DM355_SD1_DATA2);
davinci_cfg_reg(DM355_SD1_DATA3);
} else if (cpu_is_davinci_dm365()) {
- void __iomem *pupdctl1 =
- IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE + 0x7c);
-
/* Configure pull down control */
- __raw_writel((__raw_readl(pupdctl1) & ~0xfc0),
- pupdctl1);
+ void __iomem *pupdctl1 = DAVINCI_SYSMODULE_VIRT(0x7c);
+ unsigned v;
+
+ v = __raw_readl(pupdctl1);
+ __raw_writel(v & ~0xfc0, pupdctl1);
mmcsd1_resources[0].start = DM365_MMCSD1_BASE;
mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
@@ -244,11 +252,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
} else if (cpu_is_davinci_dm644x()) {
/* REVISIT: should this be in board-init code? */
- void __iomem *base =
- IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE);
-
/* Power-on 3.3V IO cells */
- __raw_writel(0, base + DM64XX_VDD3P3V_PWDN);
+ writel(0, DAVINCI_SYSMODULE_VIRT(DM64XX_VDD3P3V_PWDN));
/*Set up the pull regiter for MMC */
davinci_cfg_reg(DM644X_MSTK);
}
diff --git a/arch/arm/mach-davinci/dm355.c b/arch/arm/mach-davinci/dm355.c
index a5f8a80..1baab94 100644
--- a/arch/arm/mach-davinci/dm355.c
+++ b/arch/arm/mach-davinci/dm355.c
@@ -874,6 +874,7 @@ void __init dm355_init_asp1(u32 evt_enable, struct snd_platform_data *pdata)
void __init dm355_init(void)
{
davinci_common_init(&davinci_soc_info_dm355);
+ davinci_map_sysmod();
}
static int __init dm355_init_devices(void)
diff --git a/arch/arm/mach-davinci/dm365.c b/arch/arm/mach-davinci/dm365.c
index 02d2cc3..a788980 100644
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -1127,6 +1127,7 @@ void __init dm365_init_rtc(void)
void __init dm365_init(void)
{
davinci_common_init(&davinci_soc_info_dm365);
+ davinci_map_sysmod();
}
static struct resource dm365_vpss_resources[] = {
diff --git a/arch/arm/mach-davinci/dm644x.c b/arch/arm/mach-davinci/dm644x.c
index 9a2376b..77dea11 100644
--- a/arch/arm/mach-davinci/dm644x.c
+++ b/arch/arm/mach-davinci/dm644x.c
@@ -779,6 +779,7 @@ void __init dm644x_init_asp(struct snd_platform_data *pdata)
void __init dm644x_init(void)
{
davinci_common_init(&davinci_soc_info_dm644x);
+ davinci_map_sysmod();
}
static int __init dm644x_init_devices(void)
diff --git a/arch/arm/mach-davinci/dm646x.c b/arch/arm/mach-davinci/dm646x.c
index 1e0f809..ce93b83 100644
--- a/arch/arm/mach-davinci/dm646x.c
+++ b/arch/arm/mach-davinci/dm646x.c
@@ -903,6 +903,7 @@ void __init dm646x_init(void)
{
dm646x_board_setup_refclk(&ref_clk);
davinci_common_init(&davinci_soc_info_dm646x);
+ davinci_map_sysmod();
}
static int __init dm646x_init_devices(void)
diff --git a/arch/arm/mach-davinci/include/mach/hardware.h b/arch/arm/mach-davinci/include/mach/hardware.h
index 414e0b9..5296025 100644
--- a/arch/arm/mach-davinci/include/mach/hardware.h
+++ b/arch/arm/mach-davinci/include/mach/hardware.h
@@ -21,6 +21,12 @@
*/
#define DAVINCI_SYSTEM_MODULE_BASE 0x01C40000
+#ifndef __ASSEMBLER__
+extern void __iomem *davinci_sysmodbase;
+#define DAVINCI_SYSMODULE_VIRT(x) (davinci_sysmodbase + (x))
+void davinci_map_sysmod(void);
+#endif
+
/*
* I/O mapping
*/
--
1.6.2.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* RE: [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
2011-03-15 13:58 ` Manjunath Hadli
@ 2011-03-22 12:24 ` Nori, Sekhar
-1 siblings, 0 replies; 8+ messages in thread
From: Nori, Sekhar @ 2011-03-22 12:24 UTC (permalink / raw)
To: Hadli, Manjunath, LMML, Kevin Hilman, LAK
Cc: dlos, Mauro Carvalho Chehab, Hans Verkuil
On Tue, Mar 15, 2011 at 19:28:43, Hadli, Manjunath wrote:
> Current devices.c file has a number of instances where
> IO_ADDRESS() is used for system module register
> access. Eliminate this in favor of a ioremap()
> based access.
>
> Consequent to this, a new global pointer davinci_sysmodbase
> has been introduced which gets initialized during
> the initialization of each relevant SoC.
>
> In this patch davinci_sysmodbase is used by davinci_setup_mmc
> but the later patches in the series use the same in different
> places using DAVINCI_SYSMODULE_VIRT.This patch lays the
> foundation for that.
>
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
> ---
> arch/arm/mach-davinci/devices.c | 23 ++++++++++++++---------
> arch/arm/mach-davinci/dm355.c | 1 +
> arch/arm/mach-davinci/dm365.c | 1 +
> arch/arm/mach-davinci/dm644x.c | 1 +
> arch/arm/mach-davinci/dm646x.c | 1 +
> arch/arm/mach-davinci/include/mach/hardware.h | 6 ++++++
> 6 files changed, 24 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
> index d3b2040..b7ef950 100644
> --- a/arch/arm/mach-davinci/devices.c
> +++ b/arch/arm/mach-davinci/devices.c
> @@ -33,6 +33,14 @@
> #define DM365_MMCSD0_BASE 0x01D11000
> #define DM365_MMCSD1_BASE 0x01D00000
>
> +void __iomem *davinci_sysmodbase;
> +
> +void davinci_map_sysmod(void)
> +{
> + davinci_sysmodbase = ioremap_nocache(DAVINCI_SYSTEM_MODULE_BASE, 0x800);
> + WARN_ON(!davinci_sysmodbase);
> +}
> +
> static struct resource i2c_resources[] = {
> {
> .start = DAVINCI_I2C_BASE,
> @@ -210,12 +218,12 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
> davinci_cfg_reg(DM355_SD1_DATA2);
> davinci_cfg_reg(DM355_SD1_DATA3);
> } else if (cpu_is_davinci_dm365()) {
> - void __iomem *pupdctl1 =
> - IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE + 0x7c);
> -
> /* Configure pull down control */
> - __raw_writel((__raw_readl(pupdctl1) & ~0xfc0),
> - pupdctl1);
> + void __iomem *pupdctl1 = DAVINCI_SYSMODULE_VIRT(0x7c);
> + unsigned v;
> +
> + v = __raw_readl(pupdctl1);
> + __raw_writel(v & ~0xfc0, pupdctl1);
You fixed this as Sergei requested...
>
> mmcsd1_resources[0].start = DM365_MMCSD1_BASE;
> mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
> @@ -244,11 +252,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
> mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
> } else if (cpu_is_davinci_dm644x()) {
> /* REVISIT: should this be in board-init code? */
> - void __iomem *base =
> - IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE);
> -
> /* Power-on 3.3V IO cells */
> - __raw_writel(0, base + DM64XX_VDD3P3V_PWDN);
> + writel(0, DAVINCI_SYSMODULE_VIRT(DM64XX_VDD3P3V_PWDN));
.. but forgot to fix this. There is nothing wrong with
using writel, but it doesn't fit into what the subject
of this patch is.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
@ 2011-03-22 12:24 ` Nori, Sekhar
0 siblings, 0 replies; 8+ messages in thread
From: Nori, Sekhar @ 2011-03-22 12:24 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 15, 2011 at 19:28:43, Hadli, Manjunath wrote:
> Current devices.c file has a number of instances where
> IO_ADDRESS() is used for system module register
> access. Eliminate this in favor of a ioremap()
> based access.
>
> Consequent to this, a new global pointer davinci_sysmodbase
> has been introduced which gets initialized during
> the initialization of each relevant SoC.
>
> In this patch davinci_sysmodbase is used by davinci_setup_mmc
> but the later patches in the series use the same in different
> places using DAVINCI_SYSMODULE_VIRT.This patch lays the
> foundation for that.
>
> Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com>
> ---
> arch/arm/mach-davinci/devices.c | 23 ++++++++++++++---------
> arch/arm/mach-davinci/dm355.c | 1 +
> arch/arm/mach-davinci/dm365.c | 1 +
> arch/arm/mach-davinci/dm644x.c | 1 +
> arch/arm/mach-davinci/dm646x.c | 1 +
> arch/arm/mach-davinci/include/mach/hardware.h | 6 ++++++
> 6 files changed, 24 insertions(+), 9 deletions(-)
>
> diff --git a/arch/arm/mach-davinci/devices.c b/arch/arm/mach-davinci/devices.c
> index d3b2040..b7ef950 100644
> --- a/arch/arm/mach-davinci/devices.c
> +++ b/arch/arm/mach-davinci/devices.c
> @@ -33,6 +33,14 @@
> #define DM365_MMCSD0_BASE 0x01D11000
> #define DM365_MMCSD1_BASE 0x01D00000
>
> +void __iomem *davinci_sysmodbase;
> +
> +void davinci_map_sysmod(void)
> +{
> + davinci_sysmodbase = ioremap_nocache(DAVINCI_SYSTEM_MODULE_BASE, 0x800);
> + WARN_ON(!davinci_sysmodbase);
> +}
> +
> static struct resource i2c_resources[] = {
> {
> .start = DAVINCI_I2C_BASE,
> @@ -210,12 +218,12 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
> davinci_cfg_reg(DM355_SD1_DATA2);
> davinci_cfg_reg(DM355_SD1_DATA3);
> } else if (cpu_is_davinci_dm365()) {
> - void __iomem *pupdctl1 =
> - IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE + 0x7c);
> -
> /* Configure pull down control */
> - __raw_writel((__raw_readl(pupdctl1) & ~0xfc0),
> - pupdctl1);
> + void __iomem *pupdctl1 = DAVINCI_SYSMODULE_VIRT(0x7c);
> + unsigned v;
> +
> + v = __raw_readl(pupdctl1);
> + __raw_writel(v & ~0xfc0, pupdctl1);
You fixed this as Sergei requested...
>
> mmcsd1_resources[0].start = DM365_MMCSD1_BASE;
> mmcsd1_resources[0].end = DM365_MMCSD1_BASE +
> @@ -244,11 +252,8 @@ void __init davinci_setup_mmc(int module, struct davinci_mmc_config *config)
> mmcsd0_resources[2].start = IRQ_DM365_SDIOINT0;
> } else if (cpu_is_davinci_dm644x()) {
> /* REVISIT: should this be in board-init code? */
> - void __iomem *base =
> - IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE);
> -
> /* Power-on 3.3V IO cells */
> - __raw_writel(0, base + DM64XX_VDD3P3V_PWDN);
> + writel(0, DAVINCI_SYSMODULE_VIRT(DM64XX_VDD3P3V_PWDN));
.. but forgot to fix this. There is nothing wrong with
using writel, but it doesn't fit into what the subject
of this patch is.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
2011-03-22 12:24 ` Nori, Sekhar
@ 2011-03-22 13:15 ` Arnd Bergmann
-1 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2011-03-22 13:15 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Nori, Sekhar, Hadli, Manjunath, LMML, Kevin Hilman, Hans Verkuil,
dlos, Mauro Carvalho Chehab
On Tuesday 22 March 2011, Nori, Sekhar wrote:
> .. but forgot to fix this. There is nothing wrong with
> using writel, but it doesn't fit into what the subject
> of this patch is.
Well, to be more exact, the __raw_writel was actually
wrong here and it should be writel(), but it's certainly
better to mention the reason in the changelog, or to
make a separate patch for it.
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
@ 2011-03-22 13:15 ` Arnd Bergmann
0 siblings, 0 replies; 8+ messages in thread
From: Arnd Bergmann @ 2011-03-22 13:15 UTC (permalink / raw)
To: linux-arm-kernel
On Tuesday 22 March 2011, Nori, Sekhar wrote:
> .. but forgot to fix this. There is nothing wrong with
> using writel, but it doesn't fit into what the subject
> of this patch is.
Well, to be more exact, the __raw_writel was actually
wrong here and it should be writel(), but it's certainly
better to mention the reason in the changelog, or to
make a separate patch for it.
Arnd
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
2011-03-22 13:15 ` Arnd Bergmann
@ 2011-03-23 6:39 ` Nori, Sekhar
-1 siblings, 0 replies; 8+ messages in thread
From: Nori, Sekhar @ 2011-03-23 6:39 UTC (permalink / raw)
To: Arnd Bergmann, linux-arm-kernel
Cc: Hadli, Manjunath, LMML, Hans Verkuil, dlos,
Mauro Carvalho Chehab, Hilman, Kevin
On Tue, Mar 22, 2011 at 18:45:03, Arnd Bergmann wrote:
> On Tuesday 22 March 2011, Nori, Sekhar wrote:
> > .. but forgot to fix this. There is nothing wrong with
> > using writel, but it doesn't fit into what the subject
> > of this patch is.
>
> Well, to be more exact, the __raw_writel was actually
> wrong here and it should be writel(), but it's certainly
> better to mention the reason in the changelog, or to
> make a separate patch for it.
I wouldn't necessarily classify the use of __raw_writel as wrong
(as in a bug) - since the specific code is question is only run
on ARMv5 based SoCs.
A lot of DaVinci code uses __raw_* variants, and perhaps should
be changed to use readl/writel instead - at least it will help
copying that code over for other uses.
That should be the subject of separate (series of) patches.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod
@ 2011-03-23 6:39 ` Nori, Sekhar
0 siblings, 0 replies; 8+ messages in thread
From: Nori, Sekhar @ 2011-03-23 6:39 UTC (permalink / raw)
To: linux-arm-kernel
On Tue, Mar 22, 2011 at 18:45:03, Arnd Bergmann wrote:
> On Tuesday 22 March 2011, Nori, Sekhar wrote:
> > .. but forgot to fix this. There is nothing wrong with
> > using writel, but it doesn't fit into what the subject
> > of this patch is.
>
> Well, to be more exact, the __raw_writel was actually
> wrong here and it should be writel(), but it's certainly
> better to mention the reason in the changelog, or to
> make a separate patch for it.
I wouldn't necessarily classify the use of __raw_writel as wrong
(as in a bug) - since the specific code is question is only run
on ARMv5 based SoCs.
A lot of DaVinci code uses __raw_* variants, and perhaps should
be changed to use readl/writel instead - at least it will help
copying that code over for other uses.
That should be the subject of separate (series of) patches.
Thanks,
Sekhar
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-03-23 6:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-15 13:58 [PATCH v17 08/13] davinci: eliminate use of IO_ADDRESS() on sysmod Manjunath Hadli
2011-03-15 13:58 ` Manjunath Hadli
2011-03-22 12:24 ` Nori, Sekhar
2011-03-22 12:24 ` Nori, Sekhar
2011-03-22 13:15 ` Arnd Bergmann
2011-03-22 13:15 ` Arnd Bergmann
2011-03-23 6:39 ` Nori, Sekhar
2011-03-23 6:39 ` Nori, Sekhar
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.