[Lenny400] [Mipsbook-devel] Some tentative changes to the mainline kernel

Dr. H. Nikolaus Schaller hns at goldelico.com
Sat Apr 4 19:40:49 CEST 2015


Am 04.04.2015 um 18:42 schrieb Daniel Glöckner <daniel-gl at gmx.net>:

> Hi,
> 
> No Signed-off-by line?

Well, Paul’s patch won’t make it upstream as it is. So it is IMHO not that
strict, but we should better start with signing now, rather than hunting
in 2 years for a missing but important signed-off.

If Paul agrees, I can edit the commit message in git to add this line.

> 
> On Sat, Apr 04, 2015 at 02:15:57PM +0200, Paul Boddie wrote:
>> If anyone can see any obvious things that prevent these changes from
>> making a bootable kernel, I'd be very pleased to hear about them.
> 
> You need a spinlock to prevent a race condition when two processes
> want to access the GPIOs at the same time. That's why they introduced
> set and clear registers in the 4740.

So we should add this to the code. Well, a spinlock is slower, but on the other
hand we probably don’t need highest GPIO switching speeds.

> 
> For reading the battery voltage and powering off the device, you can
> use the driver from the following mail.

Great!

> I used it with the 2.6.31
> Kernel (after fixing the non-standard API of the I2C driver).

Yes, I remember that the I2C driver was horrible and I had tried to patch
a lot to make I2C work at all. But AFAIK my power controller driver did
never work well.

Well, my Linux kernel experience was 5 years less than today.

> 
> The Linux 2.4 USB gadget driver for the 4730 looks completely different
> from the 4740 driver. I don't think is uses the same IP core.
> 
> If the plan is to eventually switch to DT, it must be possible to
> compile a kernel that can handle both the 4740 and the 4730. So
> defining macros to different values depending on the processor is
> not an option.

Yes, we should get rid of that - and the different include files. But for the
start (to get a recent kernel doing something so that we can test it) I think
it is acceptable.

The first big goal will be to see some console log while booting (not necessarily
on screen because that requires a frame buffer, but RS232 would suffice)…

For DT we might have to append the dtb to the kernel uImage anyways
since we can’t easily modify U-Boot to load a dtb file and pass the address
to bootm.

BR,
Nikolaus


More information about the Lenny400 mailing list