Gdium GPIO support broken

45 views
Skip to first unread message

Julien De Bona

unread,
Sep 12, 2012, 1:15:46 PM9/12/12
to loongs...@googlegroups.com
Hello,

I found that commit 2539387611b8b15bb2367275df9bfd3e29dc2a0e in December
2010 broke the Gdium's GPIOs by doing this:
- set ARCH_NR_GPIOS to 4, which can fit the Loongson 2f's 4 GPIOs but
not the 64 GPIOs from the SM501 (the driver expects ARCH_NR_GPIOS==256)
- register ARCH_NR_GPIOS ls2f GPIOs, which allocates all potential GPIOs
to ls2f and leaves no room for the SM501 GPIOs.

As many things are connected to the GPIOs on the Gdium, this broke many
things.

I attached a patch fixing this problem. It sets ARCH_NR_GPIOS back to
256 for Gdium and lets the ls2f driver only register the 4 GPIOs of the
CPU. It's a patch against an old head (Linux 3.2), but I don't think
current code has changed a lot. I hope to work on an up-to-date head
once my netbook works At least I hope it can be useful for someone.

Regards
--
Julien De Bona - julien...@gmail.com
gdium_gpios.diff

Matt Turner

unread,
Sep 12, 2012, 1:29:20 PM9/12/12
to loongs...@googlegroups.com
Patches should go to Ralf and linux-mips@. Not here.

包孟謙

unread,
Sep 13, 2012, 4:40:56 AM9/13/12
to loongs...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "loongson-dev" group.
To post to this group, send email to loongs...@googlegroups.com.
To unsubscribe from this group, send email to loongson-dev...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/loongson-dev?hl=en.


Dear Julien,
(Recent) kernel support for the Gdium will be very much welcomed by me, indeed!

Thank you for developing for this forgotten system!

Sadly, I do not possess coding skills myself. However, if you require help in some other form I would be glad to oblige.

-bmq

Julien De Bona

unread,
Sep 13, 2012, 5:22:13 PM9/13/12
to loongs...@googlegroups.com
Le 12/09/12 19:29, Matt Turner a �crit :
> On Wed, Sep 12, 2012 at 10:15 AM, Julien De Bona
> <julien...@gmail.com> wrote:
>> I found that commit 2539387611b8b15bb2367275df9bfd3e29dc2a0e in December
>> 2010 broke the Gdium's GPIOs by doing this:
>> - set ARCH_NR_GPIOS to 4, which can fit the Loongson 2f's 4 GPIOs but not
>> the 64 GPIOs from the SM501 (the driver expects ARCH_NR_GPIOS==256)
>> - register ARCH_NR_GPIOS ls2f GPIOs, which allocates all potential GPIOs to
>> ls2f and leaves no room for the SM501 GPIOs.

> Patches should go to Ralf and linux-mips@. Not here.
>

The wiki homepage states that this project aims to to support loongson
machines, welcomes patches and will push its stable patchet to
linux-mips. In short: specialize in this small domain and push the
resulting work upstream when it's ready; I think I'm fitting in that:
I'm referring to a commit made in this project on code directly related
to the Loongson CPU and breaking a Loongson machine. There's no Gdium
support in linux-mips, which makes the patch irrelevant there at this
moment.

Matt Turner

unread,
Sep 13, 2012, 5:29:21 PM9/13/12
to loongs...@googlegroups.com
On Thu, Sep 13, 2012 at 2:22 PM, Julien De Bona <julien...@gmail.com> wrote:
> Le 12/09/12 19:29, Matt Turner a écrit :
They don't. No one is pushing patches from this list upstream.

I didn't realize there wasn't Gdium support upstream. Oh, just another
instance of failure to work upstream.

Julien De Bona

unread,
Sep 13, 2012, 6:26:18 PM9/13/12
to loongs...@googlegroups.com
Le 13/09/12 23:29, Matt Turner a �crit :

> They don't. No one is pushing patches from this list upstream.
>
> I didn't realize there wasn't Gdium support upstream. Oh, just another
> instance of failure to work upstream.
>
So I can consider this project is dead. I'll consider dealing with
linux-mips once I'm happy with my laptop.

If someone has an interest, I'd be happy to share my patches.

包孟謙

unread,
Sep 14, 2012, 2:06:52 AM9/14/12
to loongs...@googlegroups.com
Well, I for one would love to use them to finally run a kernel newer than 2.6.24. In what format would you like to distribute them? Git repository, tarball, ..?

-Martin

On Fri, Sep 14, 2012 at 12:26 AM, Julien De Bona <julien...@gmail.com> wrote:
Le 13/09/12 23:29, Matt Turner a écrit :
--
You received this message because you are subscribed to the Google Groups "loongson-dev" group.
To post to this group, send email to loongs...@googlegroups.com.
To unsubscribe from this group, send email to loongson-dev+unsubscribe@googlegroups.com.

Julien De Bona

unread,
Sep 15, 2012, 6:29:14 AM9/15/12
to loongs...@googlegroups.com
Le 14/09/12 08:06, 包孟謙 a écrit :
> Well, I for one would love to use them to finally run a kernel newer
> than 2.6.24. In what format would you like to distribute them? Git
> repository, tarball, ..?

I can publish more patches here or on the web in a first step. That
seems the best for me. I don't mind providing a ready to build kernel
tarball. For Git, I'd rather focus on coding as kernel development is
already quite a big thing to learn for me, so that wouldn't be for right
now.

包孟謙

unread,
Sep 15, 2012, 8:18:02 AM9/15/12
to loongs...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "loongson-dev" group.
To post to this group, send email to loongs...@googlegroups.com.
To unsubscribe from this group, send email to loongson-dev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/loongson-dev?hl=en.

No problem! Do you need some hosting space? I suppose I could provide an FTP account on my VPS..

Julien De Bona

unread,
Sep 16, 2012, 11:10:51 AM9/16/12
to loongs...@googlegroups.com
Le 15/09/12 14:18, 包孟謙 a écrit :
> On Sat, Sep 15, 2012 at 12:29 PM, Julien De Bona
> <julien...@gmail.com <mailto:julien...@gmail.com>> wrote:
> I can publish more patches here or on the web in a first step. That
> seems the best for me. I don't mind providing a ready to build
> kernel tarball. For Git, I'd rather focus on coding as kernel
> development is already quite a big thing to learn for me, so that
> wouldn't be for right now.

> No problem! Do you need some hosting space? I suppose I could provide an
> FTP account on my VPS..

I have my own server. You can find patches and their description at
http://debona.dyndns.org/gdium-dev . If you have some feedback (a
working config, how the patches apply on the latest kernel ...), I'm
interested to know. I'm now working on the audio driver, but it's a big
task for a newcomer to kernel programming like me, so I don't expect any
new patch to be available in the next weeks.
Reply all
Reply to author
Forward
0 new messages