Subject: Re: SA11x0 code copy
To: None <>
From: Robert Swindells <>
List: port-arm
Date: 07/10/2001 20:49:58
IWAMOTO  Toshihiro wrote:
>At Tue, 10 Jul 2001 16:57:23 +0900,
>IWAMOTO Toshihiro wrote:
>> At Tue, 10 Jul 2001 00:07:50 +0100 (BST),
>> Robert Swindells wrote:
>> > I have copied a snapshot of the hpcarm/sa11x0 directory to arm/sa11x0, and
>> > added some conditional code to allow it to work without using the HPC
>> > platid code.
>> I don't like hpcarm ifdefs, but I think some of them are currently
>> inevitable to work with platid codes.

>Another way to deal with platid thing is to keep attach and match
>functions out of sys/arch/arm.
>Then we should be able to nuke most of hpcarm ifdefs.

I agree that this is the preferred approach.

Most of the uses of platid seem to be in screen drivers. I didn't try
to split out the attach and match functions in sa11x0_lcd.c since our
web pad uses the MQ200 device.

I intend to try to split the mq200 driver from hpcmips in this way though.

I have added a "gpio" keyword to the saip definition. This would allow
the usage of platid in sa1111.c to be removed anyway.

The headers in sa11x0.c don't seem to be needed now either.

You also wrote:

>But I don't think hpcarm ifdefs which are used to
>  a. conditionalize softintr calls in sa1111.c
>  b. absorb interrupt code difference in sa11x0_irqhandler.c
>are necessary.

>The former should be changed to use ifdef __HAVE_GENERIC_SOFT_INTERRUPTS.

The conditional expressions in sa1111.c can go if I add ipl_to_spl() to
the arm32 version of stubs.c. I will copy softintr.c as well.

I think that any SA11x0 port would need to use soft interrupts to be able
to mask those generated from GPIOs 11-27.

>For the latter, I feel like to postpone the merge of
>sa11x0_irqhandler.c, as it is not finished yet and I find difficulty
>tweaking codes with those ifdefs.

The choice is between changing hpcarm or changing all of the arm32 ports.

The hpcarm use of "u_int imask[NIPL]" instead of "u_int
irqmasks[IPL_LEVELS]" is the same as most of the other ports.

I would rather open this up to wider discussion than wait.

Robert Swindells