2011-03-05 04:49:22

by Michael Spang

[permalink] [raw]
Subject: [PATCH 1/2] ARM: Add TS-7800 revisions 6-9

The RTC, NAND, and RNG devices are not enabled on current TS-7800s.
The manufacturer is at revision 9 (at least), and they do support
these devices. We'll assume revisions 6 through 8 do as well.

Signed-off-by: Michael Spang <[email protected]>
---
arch/arm/mach-orion5x/ts78xx-fpga.h | 4 ++++
arch/arm/mach-orion5x/ts78xx-setup.c | 4 ++++
2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-orion5x/ts78xx-fpga.h b/arch/arm/mach-orion5x/ts78xx-fpga.h
index 37b3d48..791f754 100644
--- a/arch/arm/mach-orion5x/ts78xx-fpga.h
+++ b/arch/arm/mach-orion5x/ts78xx-fpga.h
@@ -11,6 +11,10 @@ enum fpga_ids {
TS7800_REV_3 = FPGAID(0x00b480, 0x03),
TS7800_REV_4 = FPGAID(0x00b480, 0x04),
TS7800_REV_5 = FPGAID(0x00b480, 0x05),
+ TS7800_REV_6 = FPGAID(0x00b480, 0x06),
+ TS7800_REV_7 = FPGAID(0x00b480, 0x07),
+ TS7800_REV_8 = FPGAID(0x00b480, 0x08),
+ TS7800_REV_9 = FPGAID(0x00b480, 0x09),

/* Unaffordable & Expensive */
UAE_DUMMY = FPGAID(0xffffff, 0x01),
diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index c1c1cd0..7bed418 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -334,6 +334,10 @@ static void ts78xx_fpga_supports(void)
case TS7800_REV_3:
case TS7800_REV_4:
case TS7800_REV_5:
+ case TS7800_REV_6:
+ case TS7800_REV_7:
+ case TS7800_REV_8:
+ case TS7800_REV_9:
ts78xx_fpga.supports.ts_rtc.present = 1;
ts78xx_fpga.supports.ts_nand.present = 1;
ts78xx_fpga.supports.ts_rng.present = 1;
--
1.7.2.3


2011-03-05 04:49:22

by Michael Spang

[permalink] [raw]
Subject: [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions

When the manufacturer increases the revision number the platform
devices for the RTC, NAND, and RNG disappear. We should assume
new revisions have these devices instead of assuming they do not.

Signed-off-by: Michael Spang <[email protected]>
---
arch/arm/mach-orion5x/ts78xx-setup.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index 7bed418..13d1fc5 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -343,9 +343,11 @@ static void ts78xx_fpga_supports(void)
ts78xx_fpga.supports.ts_rng.present = 1;
break;
default:
- ts78xx_fpga.supports.ts_rtc.present = 0;
- ts78xx_fpga.supports.ts_nand.present = 0;
- ts78xx_fpga.supports.ts_rng.present = 0;
+ printk(KERN_WARN "Unrecognized TS-78XX FPGA ID 0x%02x",
+ ts78xx_fpga.id);
+ ts78xx_fpga.supports.ts_rtc.present = 1;
+ ts78xx_fpga.supports.ts_nand.present = 1;
+ ts78xx_fpga.supports.ts_rng.present = 1;
}
}

--
1.7.2.3

2011-03-05 04:51:01

by Michael Spang

[permalink] [raw]
Subject: [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions

When the manufacturer increases the revision number the platform
devices for the RTC, NAND, and RNG disappear. We should assume
new revisions have these devices instead of assuming they do not.

Signed-off-by: Michael Spang <[email protected]>
---
arch/arm/mach-orion5x/ts78xx-setup.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)

Misspelled KERN_WARNING. Oops. This one is tested.

diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
index 7bed418..3f8013a 100644
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -343,9 +343,11 @@ static void ts78xx_fpga_supports(void)
ts78xx_fpga.supports.ts_rng.present = 1;
break;
default:
- ts78xx_fpga.supports.ts_rtc.present = 0;
- ts78xx_fpga.supports.ts_nand.present = 0;
- ts78xx_fpga.supports.ts_rng.present = 0;
+ printk(KERN_WARNING "Unrecognized TS-78XX FPGA ID 0x%02x",
+ ts78xx_fpga.id);
+ ts78xx_fpga.supports.ts_rtc.present = 1;
+ ts78xx_fpga.supports.ts_nand.present = 1;
+ ts78xx_fpga.supports.ts_rng.present = 1;
}
}

--
1.7.2.3

2011-03-05 04:59:06

by Nicolas Pitre

[permalink] [raw]
Subject: Re: [PATCH 1/2] ARM: Add TS-7800 revisions 6-9

On Fri, 4 Mar 2011, Michael Spang wrote:

> The RTC, NAND, and RNG devices are not enabled on current TS-7800s.
> The manufacturer is at revision 9 (at least), and they do support
> these devices. We'll assume revisions 6 through 8 do as well.
>
> Signed-off-by: Michael Spang <[email protected]>

Alexander Clouter <[email protected]> did send the exact same patch on
February 16 already.


Nicolas

2011-03-05 12:32:22

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions

Hello.

On 05-03-2011 7:39, Michael Spang wrote:

> When the manufacturer increases the revision number the platform
> devices for the RTC, NAND, and RNG disappear. We should assume
> new revisions have these devices instead of assuming they do not.

> Signed-off-by: Michael Spang<[email protected]>
> ---
> arch/arm/mach-orion5x/ts78xx-setup.c | 8 +++++---
> 1 files changed, 5 insertions(+), 3 deletions(-)

> diff --git a/arch/arm/mach-orion5x/ts78xx-setup.c b/arch/arm/mach-orion5x/ts78xx-setup.c
> index 7bed418..13d1fc5 100644
> --- a/arch/arm/mach-orion5x/ts78xx-setup.c
> +++ b/arch/arm/mach-orion5x/ts78xx-setup.c
> @@ -343,9 +343,11 @@ static void ts78xx_fpga_supports(void)
> ts78xx_fpga.supports.ts_rng.present = 1;
> break;
> default:
> - ts78xx_fpga.supports.ts_rtc.present = 0;
> - ts78xx_fpga.supports.ts_nand.present = 0;
> - ts78xx_fpga.supports.ts_rng.present = 0;
> + printk(KERN_WARN "Unrecognized TS-78XX FPGA ID 0x%02x",

Use pr_warning() or pr_warn().

WBR, Sergei