mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 13:41:51 +00:00
floppy: use symbolic register names in the sparc32 port
The sparc port used to be forced to rely on numeric register indexes with their equivalent in comments. Now that they don't depend on the IO port we can use their symbolic names. Link: https://lore.kernel.org/r/20200331094054.24441-7-w@1wt.eu Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Denis Efremov <efremov@linux.com>
This commit is contained in:
parent
7fd3463188
commit
6d362018c6
@ -114,15 +114,15 @@ static unsigned char sun_read_dir(void)
|
||||
static unsigned char sun_82072_fd_inb(int port)
|
||||
{
|
||||
udelay(5);
|
||||
switch(port & 7) {
|
||||
switch (port) {
|
||||
default:
|
||||
printk("floppy: Asked to read unknown port %d\n", port);
|
||||
panic("floppy: Port bolixed.");
|
||||
case 4: /* FD_STATUS */
|
||||
case FD_STATUS:
|
||||
return sun_fdc->status_82072 & ~STATUS_DMA;
|
||||
case 5: /* FD_DATA */
|
||||
case FD_DATA:
|
||||
return sun_fdc->data_82072;
|
||||
case 7: /* FD_DIR */
|
||||
case FD_DIR:
|
||||
return sun_read_dir();
|
||||
}
|
||||
panic("sun_82072_fd_inb: How did I get here?");
|
||||
@ -131,20 +131,20 @@ static unsigned char sun_82072_fd_inb(int port)
|
||||
static void sun_82072_fd_outb(unsigned char value, int port)
|
||||
{
|
||||
udelay(5);
|
||||
switch(port & 7) {
|
||||
switch (port) {
|
||||
default:
|
||||
printk("floppy: Asked to write to unknown port %d\n", port);
|
||||
panic("floppy: Port bolixed.");
|
||||
case 2: /* FD_DOR */
|
||||
case FD_DOR:
|
||||
sun_set_dor(value, 0);
|
||||
break;
|
||||
case 5: /* FD_DATA */
|
||||
case FD_DATA:
|
||||
sun_fdc->data_82072 = value;
|
||||
break;
|
||||
case 7: /* FD_DCR */
|
||||
case FD_DCR:
|
||||
sun_fdc->dcr_82072 = value;
|
||||
break;
|
||||
case 4: /* FD_STATUS */
|
||||
case FD_DSR:
|
||||
sun_fdc->status_82072 = value;
|
||||
break;
|
||||
}
|
||||
@ -154,23 +154,23 @@ static void sun_82072_fd_outb(unsigned char value, int port)
|
||||
static unsigned char sun_82077_fd_inb(int port)
|
||||
{
|
||||
udelay(5);
|
||||
switch(port & 7) {
|
||||
switch (port) {
|
||||
default:
|
||||
printk("floppy: Asked to read unknown port %d\n", port);
|
||||
panic("floppy: Port bolixed.");
|
||||
case 0: /* FD_STATUS_0 */
|
||||
case FD_SRA:
|
||||
return sun_fdc->status1_82077;
|
||||
case 1: /* FD_STATUS_1 */
|
||||
case FD_SRB:
|
||||
return sun_fdc->status2_82077;
|
||||
case 2: /* FD_DOR */
|
||||
case FD_DOR:
|
||||
return sun_fdc->dor_82077;
|
||||
case 3: /* FD_TDR */
|
||||
case FD_TDR:
|
||||
return sun_fdc->tapectl_82077;
|
||||
case 4: /* FD_STATUS */
|
||||
case FD_STATUS:
|
||||
return sun_fdc->status_82077 & ~STATUS_DMA;
|
||||
case 5: /* FD_DATA */
|
||||
case FD_DATA:
|
||||
return sun_fdc->data_82077;
|
||||
case 7: /* FD_DIR */
|
||||
case FD_DIR:
|
||||
return sun_read_dir();
|
||||
}
|
||||
panic("sun_82077_fd_inb: How did I get here?");
|
||||
@ -179,23 +179,23 @@ static unsigned char sun_82077_fd_inb(int port)
|
||||
static void sun_82077_fd_outb(unsigned char value, int port)
|
||||
{
|
||||
udelay(5);
|
||||
switch(port & 7) {
|
||||
switch (port) {
|
||||
default:
|
||||
printk("floppy: Asked to write to unknown port %d\n", port);
|
||||
panic("floppy: Port bolixed.");
|
||||
case 2: /* FD_DOR */
|
||||
case FD_DOR:
|
||||
sun_set_dor(value, 1);
|
||||
break;
|
||||
case 5: /* FD_DATA */
|
||||
case FD_DATA:
|
||||
sun_fdc->data_82077 = value;
|
||||
break;
|
||||
case 7: /* FD_DCR */
|
||||
case FD_DCR:
|
||||
sun_fdc->dcr_82077 = value;
|
||||
break;
|
||||
case 4: /* FD_STATUS */
|
||||
case FD_DSR:
|
||||
sun_fdc->status_82077 = value;
|
||||
break;
|
||||
case 3: /* FD_TDR */
|
||||
case FD_TDR:
|
||||
sun_fdc->tapectl_82077 = value;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user