2011-02-11 14:37:52

by Subhasish Ghosh

[permalink] [raw]
Subject: [PATCH v2 03/13] da850: pruss board specific additions.

This patch adds board specific initializations and setup routines.

Signed-off-by: Subhasish Ghosh <[email protected]>
---
arch/arm/mach-davinci/board-da850-evm.c | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
index 11f986b..242d1ed 100644
--- a/arch/arm/mach-davinci/board-da850-evm.c
+++ b/arch/arm/mach-davinci/board-da850-evm.c
@@ -1053,6 +1053,26 @@ static __init int da850_evm_init_cpufreq(void)
static __init int da850_evm_init_cpufreq(void) { return 0; }
#endif

+static struct da8xx_pruss_devices pruss_devices[] = {
+ {.dev_name = NULL,},
+};
+
+static int __init da8xx_evm_setup_pruss(void)
+{
+ u32 ret = 0;
+ u32 count;
+
+ for (count = 0; count < ARRAY_SIZE(pruss_devices); count++) {
+ if (pruss_devices[count].setup != NULL) {
+ ret = pruss_devices[count].setup();
+ if (ret)
+ return ret;
+ }
+ }
+
+ return da8xx_register_pruss(pruss_devices);
+}
+
static __init void da850_evm_init(void)
{
int ret;
@@ -1127,6 +1147,11 @@ static __init void da850_evm_init(void)

da8xx_register_mcasp(0, &da850_evm_snd_data);

+ ret = da8xx_evm_setup_pruss();
+ if (ret)
+ pr_warning("%s: pruss initialization failed: %d\n",
+ __func__, ret);
+
ret = davinci_cfg_reg_list(da850_lcdcntl_pins);
if (ret)
pr_warning("da850_evm_init: lcdcntl mux setup failed: %d\n",
--
1.7.2.3


2011-02-11 18:44:33

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH v2 03/13] da850: pruss board specific additions.

Subhasish Ghosh wrote:

> This patch adds board specific initializations and setup routines.

> Signed-off-by: Subhasish Ghosh <[email protected]>
[...]

> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
> index 11f986b..242d1ed 100644
> --- a/arch/arm/mach-davinci/board-da850-evm.c
> +++ b/arch/arm/mach-davinci/board-da850-evm.c
> @@ -1053,6 +1053,26 @@ static __init int da850_evm_init_cpufreq(void)
> static __init int da850_evm_init_cpufreq(void) { return 0; }
> #endif
>
> +static struct da8xx_pruss_devices pruss_devices[] = {
> + {.dev_name = NULL,},

No need to explicitly initialize to NULL.

WBR, Sergei

2011-02-18 07:17:50

by Subhasish Ghosh

[permalink] [raw]
Subject: Re: [PATCH v2 03/13] da850: pruss board specific additions.



--------------------------------------------------
From: "Sergei Shtylyov" <[email protected]>
Sent: Saturday, February 12, 2011 12:13 AM
To: "Subhasish Ghosh" <[email protected]>
Cc: <[email protected]>;
<[email protected]>; "Russell King" <[email protected]>;
"Kevin Hilman" <[email protected]>; "open list"
<[email protected]>; <[email protected]>;
<[email protected]>
Subject: Re: [PATCH v2 03/13] da850: pruss board specific additions.

> Subhasish Ghosh wrote:
>
>> This patch adds board specific initializations and setup routines.
>
>> Signed-off-by: Subhasish Ghosh <[email protected]>
> [...]
>
>> diff --git a/arch/arm/mach-davinci/board-da850-evm.c
>> b/arch/arm/mach-davinci/board-da850-evm.c
>> index 11f986b..242d1ed 100644
>> --- a/arch/arm/mach-davinci/board-da850-evm.c
>> +++ b/arch/arm/mach-davinci/board-da850-evm.c
>> @@ -1053,6 +1053,26 @@ static __init int da850_evm_init_cpufreq(void)
>> static __init int da850_evm_init_cpufreq(void) { return 0; }
>> #endif
>> +static struct da8xx_pruss_devices pruss_devices[] = {
>> + {.dev_name = NULL,},
>
> No need to explicitly initialize to NULL.
>
SG - Ok, Will remove

> WBR, Sergei
>