Subject: Re: 16bit aligned NS16550 variant
To: Simon Burge <>
From: TAKEMURA Shin <>
List: tech-kern
Date: 10/20/2001 21:35:16
----- Original Message ----- 
From: "Simon Burge" <>
To: "TAKEMURA Shin" <>
Cc: <>
Sent: Saturday, October 20, 2001 7:21 PM
Subject: Re: 16bit aligned NS16550 variant 

> > I'd like to change NS16550 serial driver, 'com' to add 16bit register
> > access support. And I've made the patch(attached).
> > 
> > Some embedded companion chip and ASIC have UART compatible
> > function but you must make 16bit access for thier registers.
> The correct way to do this is to add a bus_space for the bus the device
> is connected to.  I'm currently using an embedded chip with a '550-alike
> with registers on 32-bit boundaries without any modifications to the
> bus_space_{read,write}_1's in com.c.  I've got some other mods to com.c,
> but that's for issues like the chip I'm dealing with having a single
> 16bit clock divisor register (accessed with bus_space_write_2 but
> it's physically a 32bit access register) instead of two separate 8bit
> registers.

I knew the way. But I didn't think this is bus issue because data book of 
the chip says just 'Interrupt Enable register is 16bit width at offset 0x2'.
So I've made the patch for the chip, not for bus.

> By using a separate bus space, you don't need to modify every driver you
> need to access with your special restrictions.

Some machines including hpcmips have only one bus space and it isn't
easy to add a separate bus space...
(But it's OK if you will update bus stuff of all machines.)

BTW, I can't found 'bus_space_write_2' in com.c. Do you have any changes
which you are going to commit?