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.deb...@gmail.com
> 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.deb...@gmail.com
Patches should go to Ralf and linux-mips@. Not here.
On Wed, Sep 12, 2012 at 7:29 PM, Matt Turner <matts...@gmail.com> wrote:
> On Wed, Sep 12, 2012 at 10:15 AM, Julien De Bona
> <julien.deb...@gmail.com> wrote:
> > 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.deb...@gmail.com
> Patches should go to Ralf and linux-mips@. Not here.
> --
> You received this message because you are subscribed to the Google Groups
> "loongson-dev" group.
> To post to this group, send email to loongson-dev@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.
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.
> On Wed, Sep 12, 2012 at 10:15 AM, Julien De Bona
> <julien.deb...@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.
-- Julien De Bona - julien.deb...@gmail.com
>> On Wed, Sep 12, 2012 at 10:15 AM, Julien De Bona
>> <julien.deb...@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.
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.
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.deb...@gmail.com>wrote:
> --
> You received this message because you are subscribed to the Google Groups
> "loongson-dev" group.
> To post to this group, send email to loongson-dev@googlegroups.com.
> To unsubscribe from this group, send email to loongson-dev+unsubscribe@**
> googlegroups.com <loongson-dev%2Bunsubscribe@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/** > group/loongson-dev?hl=en<http://groups.google.com/group/loongson-dev?hl=en>
> .
> 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.
> 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.
> --
> You received this message because you are subscribed to the Google Groups
> "loongson-dev" group.
> To post to this group, send email to loongson-dev@googlegroups.com.
> To unsubscribe from this group, send email to loongson-dev+unsubscribe@**
> googlegroups.com <loongson-dev%2Bunsubscribe@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/** > group/loongson-dev?hl=en<http://groups.google.com/group/loongson-dev?hl=en>
> .
> No problem! Do you need some hosting space? I suppose I could provide an
> On Sat, Sep 15, 2012 at 12:29 PM, Julien De Bona
> <julien.deb...@gmail.com <mailto:julien.deb...@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.
-- Julien De Bona - julien.deb...@gmail.com