linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] ARM: Add TS-7800 revisions 6-9
@ 2011-03-05  4:39 Michael Spang
  2011-03-05  4:39 ` [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions Michael Spang
  2011-03-05  4:59 ` [PATCH 1/2] ARM: Add TS-7800 revisions 6-9 Nicolas Pitre
  0 siblings, 2 replies; 8+ messages in thread
From: Michael Spang @ 2011-03-05  4:39 UTC (permalink / raw)
  To: linux-arm-kernel

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 <mspang@csclub.uwaterloo.ca>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions
  2011-03-05  4:39 [PATCH 1/2] ARM: Add TS-7800 revisions 6-9 Michael Spang
@ 2011-03-05  4:39 ` Michael Spang
  2011-03-05  4:50   ` [PATCH v2 " Michael Spang
  2011-03-05 12:30   ` [PATCH " Sergei Shtylyov
  2011-03-05  4:59 ` [PATCH 1/2] ARM: Add TS-7800 revisions 6-9 Nicolas Pitre
  1 sibling, 2 replies; 8+ messages in thread
From: Michael Spang @ 2011-03-05  4:39 UTC (permalink / raw)
  To: linux-arm-kernel

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 <mspang@csclub.uwaterloo.ca>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions
  2011-03-05  4:39 ` [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions Michael Spang
@ 2011-03-05  4:50   ` Michael Spang
  2011-03-05 12:30   ` [PATCH " Sergei Shtylyov
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Spang @ 2011-03-05  4:50 UTC (permalink / raw)
  To: linux-arm-kernel

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 <mspang@csclub.uwaterloo.ca>
---
 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 1/2] ARM: Add TS-7800 revisions 6-9
  2011-03-05  4:39 [PATCH 1/2] ARM: Add TS-7800 revisions 6-9 Michael Spang
  2011-03-05  4:39 ` [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions Michael Spang
@ 2011-03-05  4:59 ` Nicolas Pitre
  1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2011-03-05  4:59 UTC (permalink / raw)
  To: linux-arm-kernel

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 <mspang@csclub.uwaterloo.ca>

Alexander Clouter <alex@digriz.org.uk> did send the exact same patch on 
February 16 already.


Nicolas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions
@ 2011-03-05 10:32 Alexander Clouter
  2011-03-05 20:05 ` Nicolas Pitre
  2011-03-05 21:32 ` Michael Spang
  0 siblings, 2 replies; 8+ messages in thread
From: Alexander Clouter @ 2011-03-05 10:32 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

In gmane.linux.kernel Michael Spang <mspang@csclub.uwaterloo.ca> 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.
>
NACK

This would break things for anyone running a custom FPGA bitstream (and 
they are out there) .  The RTC and RNG are possibly the only things that 
are able to be implemented in a custom FPGA, the NAND is wholly TS 
specific..

Please could you refrain submitting patches for TS-7800 without having 
a quick look at:
 * http://git.kernel.org/?p=linux/kernel/git/nico/orion.git
 * http://www.digriz.org.uk/ts78xx/kernel

The former is pretty much what you have to base all your patches on so 
you should be tracking it (which would have solved the re-inventing the 
revision update patch), whilst the latter would help tell you things 
that have already been done elsewhere.

The latter site also includes thoughts on where the platform code is 
going.  So far as *zero* people have ever provided feedback or thoughts 
(unfortunately they seem too busy just bluntly hammering things in the 
ts7000 forum) I have so far to date only done things that I feel are 
most appropriate.  This includes things like the doorbell code necessary 
to get IRQ's firing from the PC/104 bus...which I hope no-one is wasting 
their time re-implementing?

This is not a case of megalomania, it's a case of saving wasted effort, 
testing patches and getting obtaining code review.

I can see the value in this particular patch, but problems with it could 
have trivially been avoided by reworking the FPGA ID code so that the 
RTC/NAND/RNG are only enabled when the *magic* is set to 0x00b480; then 
we should remove the all the 'case TS7800_REV_1..9' bits.  I'll put this 
together and push it to Nico, reverting your efforts... :-/

Cheers

[1] http://git.wormnet.eu/?p=alex/ts78xx.git;a=commitdiff;h=de3a91588ccc5f9443f0e0a1656a94c6ddb19bdb

-- 
Alexander Clouter
.sigmonster says: It's not the fall that kills you, it's the landing.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions
  2011-03-05  4:39 ` [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions Michael Spang
  2011-03-05  4:50   ` [PATCH v2 " Michael Spang
@ 2011-03-05 12:30   ` Sergei Shtylyov
  1 sibling, 0 replies; 8+ messages in thread
From: Sergei Shtylyov @ 2011-03-05 12:30 UTC (permalink / raw)
  To: linux-arm-kernel

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<mspang@csclub.uwaterloo.ca>
> ---
>   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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions
  2011-03-05 10:32 [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions Alexander Clouter
@ 2011-03-05 20:05 ` Nicolas Pitre
  2011-03-05 21:32 ` Michael Spang
  1 sibling, 0 replies; 8+ messages in thread
From: Nicolas Pitre @ 2011-03-05 20:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, 5 Mar 2011, Alexander Clouter wrote:

> Hi,
> 
> In gmane.linux.kernel Michael Spang <mspang@csclub.uwaterloo.ca> 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.
> >
> NACK
> 
> This would break things for anyone running a custom FPGA bitstream (and 
> they are out there) .  The RTC and RNG are possibly the only things that 
> are able to be implemented in a custom FPGA, the NAND is wholly TS 
> specific..
> 
> Please could you refrain submitting patches for TS-7800 without having 
> a quick look at:
>  * http://git.kernel.org/?p=linux/kernel/git/nico/orion.git
>  * http://www.digriz.org.uk/ts78xx/kernel
> 
> The former is pretty much what you have to base all your patches on so 
> you should be tracking it (which would have solved the re-inventing the 
> revision update patch), whilst the latter would help tell you things 
> that have already been done elsewhere.
> 
> The latter site also includes thoughts on where the platform code is 
> going.  So far as *zero* people have ever provided feedback or thoughts 
> (unfortunately they seem too busy just bluntly hammering things in the 
> ts7000 forum) I have so far to date only done things that I feel are 
> most appropriate.  This includes things like the doorbell code necessary 
> to get IRQ's firing from the PC/104 bus...which I hope no-one is wasting 
> their time re-implementing?
> 
> This is not a case of megalomania, it's a case of saving wasted effort, 
> testing patches and getting obtaining code review.

May I ask you to create a patch adding an entry specificly for TS-7800 
to the MAINTAINERS file in the top directory, something like:

Technologic Systems TS-78xx platform support
M:	Alexander Clouter <alex@digriz.org.uk>
W:	http://www.digriz.org.uk/ts78xx/kernel
S:	Maintained
F:	arch/arm/mach-orion5x/ts78xx-*


Nicolas

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions
  2011-03-05 10:32 [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions Alexander Clouter
  2011-03-05 20:05 ` Nicolas Pitre
@ 2011-03-05 21:32 ` Michael Spang
  1 sibling, 0 replies; 8+ messages in thread
From: Michael Spang @ 2011-03-05 21:32 UTC (permalink / raw)
  To: linux-arm-kernel

On Sat, Mar 5, 2011 at 5:32 AM, Alexander Clouter <alex@digriz.org.uk> wrote:
> Hi,
>
> In gmane.linux.kernel Michael Spang <mspang@csclub.uwaterloo.ca> 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.
>>
> NACK
>
> This would break things for anyone running a custom FPGA bitstream (and
> they are out there) . ?The RTC and RNG are possibly the only things that
> are able to be implemented in a custom FPGA, the NAND is wholly TS
> specific..
>
> Please could you refrain submitting patches for TS-7800 without having
> a quick look at:
> ?* http://git.kernel.org/?p=linux/kernel/git/nico/orion.git
> ?* http://www.digriz.org.uk/ts78xx/kernel

Ok.

>
> The former is pretty much what you have to base all your patches on so
> you should be tracking it (which would have solved the re-inventing the
> revision update patch), whilst the latter would help tell you things
> that have already been done elsewhere.

>
> I can see the value in this particular patch, but problems with it could
> have trivially been avoided by reworking the FPGA ID code so that the
> RTC/NAND/RNG are only enabled when the *magic* is set to 0x00b480; then
> we should remove the all the 'case TS7800_REV_1..9' bits. ?I'll put this
> together and push it to Nico, reverting your efforts... :-/

That's a fine solution. I just wanted to avoid subjecting another user
to having to track down why the devices weren't showing up. I think
that efforts to make the kernel work with modified hardware should be
secondary to having the stock unit work properly.

Michael

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-03-05 21:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-05  4:39 [PATCH 1/2] ARM: Add TS-7800 revisions 6-9 Michael Spang
2011-03-05  4:39 ` [PATCH 2/2] ARM: Enable TS-78XX features in unknown revisions Michael Spang
2011-03-05  4:50   ` [PATCH v2 " Michael Spang
2011-03-05 12:30   ` [PATCH " Sergei Shtylyov
2011-03-05  4:59 ` [PATCH 1/2] ARM: Add TS-7800 revisions 6-9 Nicolas Pitre
  -- strict thread matches above, loose matches on Subject: below --
2011-03-05 10:32 [PATCH v2 2/2] ARM: Enable TS-78XX features in unknown revisions Alexander Clouter
2011-03-05 20:05 ` Nicolas Pitre
2011-03-05 21:32 ` Michael Spang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).