parisc architecture fixes for kernel v6.1-rc4:
Rename the serial port 8250_gsc.c driver to 8250_parisc.c and cleanup how the device IDs of devices in a PA-RISC machine are shown at startup. -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQS86RI+GtKfB8BJu973ErUQojoPXwUCY2KHWQAKCRD3ErUQojoP XwzoAQCOzXAVgz2XsZuNtAdap/Q/02kcCToTOPqJcvuaXbm87QEAwXGN8XWpdTli n2Egvuq5T2LFMSq3ERqGOVj502hYfwo= =UWoU -----END PGP SIGNATURE----- Merge tag 'parisc-for-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux Pull parisc architecture fixes from Helge Deller: "This mostly handles oddities with the serial port 8250_gsc.c driver. Although the name suggests it's just for serial ports on the GSC bus (e.g. in older PA-RISC machines), it handles serial ports on PA-RISC PCI devices (e.g. on the SuperIO chip) as well. Thus this renames the driver to 8250_parisc and fixes the config dependencies. The other change is a cleanup on how the device IDs of devices in a PA-RISC machine are shown at startup" * tag 'parisc-for-6.1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux: parisc: Avoid printing the hardware path twice parisc: Export iosapic_serial_irq() symbol for serial port driver MAINTAINERS: adjust entry after renaming parisc serial driver parisc: Use signed char for hardware path in pdc.h parisc/serial: Rename 8250_gsc.c to 8250_parisc.c parisc: Make 8250_gsc driver dependend on CONFIG_PARISC
This commit is contained in:
Коммит
8e5423e991
|
@ -15630,7 +15630,7 @@ F: drivers/input/serio/gscps2.c
|
|||
F: drivers/input/serio/hp_sdc*
|
||||
F: drivers/parisc/
|
||||
F: drivers/parport/parport_gsc.*
|
||||
F: drivers/tty/serial/8250/8250_gsc.c
|
||||
F: drivers/tty/serial/8250/8250_parisc.c
|
||||
F: drivers/video/console/sti*
|
||||
F: drivers/video/fbdev/sti*
|
||||
F: drivers/video/logo/logo_parisc*
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
#define SVERSION_ANY_ID PA_SVERSION_ANY_ID
|
||||
|
||||
struct hp_hardware {
|
||||
unsigned short hw_type:5; /* HPHW_xxx */
|
||||
unsigned short hversion;
|
||||
unsigned long sversion:28;
|
||||
unsigned short opt;
|
||||
const char name[80]; /* The hardware description */
|
||||
};
|
||||
unsigned int hw_type:8; /* HPHW_xxx */
|
||||
unsigned int hversion:12;
|
||||
unsigned int sversion:12;
|
||||
unsigned char opt;
|
||||
unsigned char name[59]; /* The hardware description */
|
||||
} __packed;
|
||||
|
||||
struct parisc_device;
|
||||
|
||||
|
|
|
@ -363,20 +363,25 @@
|
|||
|
||||
#if !defined(__ASSEMBLY__)
|
||||
|
||||
/* flags of the device_path */
|
||||
/* flags for hardware_path */
|
||||
#define PF_AUTOBOOT 0x80
|
||||
#define PF_AUTOSEARCH 0x40
|
||||
#define PF_TIMER 0x0F
|
||||
|
||||
struct device_path { /* page 1-69 */
|
||||
unsigned char flags; /* flags see above! */
|
||||
unsigned char bc[6]; /* bus converter routing info */
|
||||
unsigned char mod;
|
||||
unsigned int layers[6];/* device-specific layer-info */
|
||||
} __attribute__((aligned(8))) ;
|
||||
struct hardware_path {
|
||||
unsigned char flags; /* see bit definitions below */
|
||||
signed char bc[6]; /* Bus Converter routing info to a specific */
|
||||
/* I/O adaptor (< 0 means none, > 63 resvd) */
|
||||
signed char mod; /* fixed field of specified module */
|
||||
};
|
||||
|
||||
struct pdc_module_path { /* page 1-69 */
|
||||
struct hardware_path path;
|
||||
unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */
|
||||
} __attribute__((aligned(8)));
|
||||
|
||||
struct pz_device {
|
||||
struct device_path dp; /* see above */
|
||||
struct pdc_module_path dp; /* see above */
|
||||
/* struct iomod *hpa; */
|
||||
unsigned int hpa; /* HPA base address */
|
||||
/* char *spa; */
|
||||
|
@ -611,21 +616,6 @@ struct pdc_initiator { /* PDC_INITIATOR */
|
|||
int mode;
|
||||
};
|
||||
|
||||
struct hardware_path {
|
||||
char flags; /* see bit definitions below */
|
||||
char bc[6]; /* Bus Converter routing info to a specific */
|
||||
/* I/O adaptor (< 0 means none, > 63 resvd) */
|
||||
char mod; /* fixed field of specified module */
|
||||
};
|
||||
|
||||
/*
|
||||
* Device path specifications used by PDC.
|
||||
*/
|
||||
struct pdc_module_path {
|
||||
struct hardware_path path;
|
||||
unsigned int layers[6]; /* device-specific info (ctlr #, unit # ...) */
|
||||
};
|
||||
|
||||
/* Only used on some pre-PA2.0 boxes */
|
||||
struct pdc_memory_map { /* PDC_MEMORY_MAP */
|
||||
unsigned long hpa; /* mod's register set address */
|
||||
|
|
|
@ -882,15 +882,13 @@ void __init walk_central_bus(void)
|
|||
&root);
|
||||
}
|
||||
|
||||
static void print_parisc_device(struct parisc_device *dev)
|
||||
static __init void print_parisc_device(struct parisc_device *dev)
|
||||
{
|
||||
char hw_path[64];
|
||||
static int count;
|
||||
static int count __initdata;
|
||||
|
||||
print_pa_hwpath(dev, hw_path);
|
||||
pr_info("%d. %s at %pap [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
|
||||
++count, dev->name, &(dev->hpa.start), hw_path, dev->id.hw_type,
|
||||
dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
|
||||
pr_info("%d. %s at %pap { type:%d, hv:%#x, sv:%#x, rev:%#x }",
|
||||
++count, dev->name, &(dev->hpa.start), dev->id.hw_type,
|
||||
dev->id.hversion, dev->id.sversion, dev->id.hversion_rev);
|
||||
|
||||
if (dev->num_addrs) {
|
||||
int k;
|
||||
|
@ -1079,7 +1077,7 @@ static __init int qemu_print_iodc_data(struct device *lin_dev, void *data)
|
|||
|
||||
|
||||
|
||||
static int print_one_device(struct device * dev, void * data)
|
||||
static __init int print_one_device(struct device * dev, void * data)
|
||||
{
|
||||
struct parisc_device * pdev = to_parisc_device(dev);
|
||||
|
||||
|
|
|
@ -866,6 +866,7 @@ int iosapic_serial_irq(struct parisc_device *dev)
|
|||
|
||||
return vi->txn_irq;
|
||||
}
|
||||
EXPORT_SYMBOL(iosapic_serial_irq);
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
* all) PA-RISC machines should have them. Anyway, for safety reasons, the
|
||||
* following code can deal with just 96 bytes of Stable Storage, and all
|
||||
* sizes between 96 and 192 bytes (provided they are multiple of struct
|
||||
* device_path size, eg: 128, 160 and 192) to provide full information.
|
||||
* pdc_module_path size, eg: 128, 160 and 192) to provide full information.
|
||||
* One last word: there's one path we can always count on: the primary path.
|
||||
* Anything above 224 bytes is used for 'osdep2' OS-dependent storage area.
|
||||
*
|
||||
|
@ -88,7 +88,7 @@ struct pdcspath_entry {
|
|||
short ready; /* entry record is valid if != 0 */
|
||||
unsigned long addr; /* entry address in stable storage */
|
||||
char *name; /* entry name */
|
||||
struct device_path devpath; /* device path in parisc representation */
|
||||
struct pdc_module_path devpath; /* device path in parisc representation */
|
||||
struct device *dev; /* corresponding device */
|
||||
struct kobject kobj;
|
||||
};
|
||||
|
@ -138,7 +138,7 @@ struct pdcspath_attribute paths_attr_##_name = { \
|
|||
static int
|
||||
pdcspath_fetch(struct pdcspath_entry *entry)
|
||||
{
|
||||
struct device_path *devpath;
|
||||
struct pdc_module_path *devpath;
|
||||
|
||||
if (!entry)
|
||||
return -EINVAL;
|
||||
|
@ -153,7 +153,7 @@ pdcspath_fetch(struct pdcspath_entry *entry)
|
|||
return -EIO;
|
||||
|
||||
/* Find the matching device.
|
||||
NOTE: hardware_path overlays with device_path, so the nice cast can
|
||||
NOTE: hardware_path overlays with pdc_module_path, so the nice cast can
|
||||
be used */
|
||||
entry->dev = hwpath_to_device((struct hardware_path *)devpath);
|
||||
|
||||
|
@ -179,7 +179,7 @@ pdcspath_fetch(struct pdcspath_entry *entry)
|
|||
static void
|
||||
pdcspath_store(struct pdcspath_entry *entry)
|
||||
{
|
||||
struct device_path *devpath;
|
||||
struct pdc_module_path *devpath;
|
||||
|
||||
BUG_ON(!entry);
|
||||
|
||||
|
@ -221,7 +221,7 @@ static ssize_t
|
|||
pdcspath_hwpath_read(struct pdcspath_entry *entry, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
struct device_path *devpath;
|
||||
struct pdc_module_path *devpath;
|
||||
short i;
|
||||
|
||||
if (!entry || !buf)
|
||||
|
@ -236,11 +236,11 @@ pdcspath_hwpath_read(struct pdcspath_entry *entry, char *buf)
|
|||
return -ENODATA;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
if (devpath->bc[i] >= 128)
|
||||
if (devpath->path.bc[i] < 0)
|
||||
continue;
|
||||
out += sprintf(out, "%u/", (unsigned char)devpath->bc[i]);
|
||||
out += sprintf(out, "%d/", devpath->path.bc[i]);
|
||||
}
|
||||
out += sprintf(out, "%u\n", (unsigned char)devpath->mod);
|
||||
out += sprintf(out, "%u\n", (unsigned char)devpath->path.mod);
|
||||
|
||||
return out - buf;
|
||||
}
|
||||
|
@ -296,12 +296,12 @@ pdcspath_hwpath_write(struct pdcspath_entry *entry, const char *buf, size_t coun
|
|||
for (i=5; ((temp = strrchr(in, '/'))) && (temp-in > 0) && (likely(i)); i--) {
|
||||
hwpath.bc[i] = simple_strtoul(temp+1, NULL, 10);
|
||||
in[temp-in] = '\0';
|
||||
DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.bc[i]);
|
||||
DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.path.bc[i]);
|
||||
}
|
||||
|
||||
/* Store the final field */
|
||||
hwpath.bc[i] = simple_strtoul(in, NULL, 10);
|
||||
DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.bc[i]);
|
||||
DPRINTK("%s: bc[%d]: %d\n", __func__, i, hwpath.path.bc[i]);
|
||||
|
||||
/* Now we check that the user isn't trying to lure us */
|
||||
if (!(dev = hwpath_to_device((struct hardware_path *)&hwpath))) {
|
||||
|
@ -342,7 +342,7 @@ static ssize_t
|
|||
pdcspath_layer_read(struct pdcspath_entry *entry, char *buf)
|
||||
{
|
||||
char *out = buf;
|
||||
struct device_path *devpath;
|
||||
struct pdc_module_path *devpath;
|
||||
short i;
|
||||
|
||||
if (!entry || !buf)
|
||||
|
@ -547,7 +547,7 @@ static ssize_t pdcs_auto_read(struct kobject *kobj,
|
|||
pathentry = &pdcspath_entry_primary;
|
||||
|
||||
read_lock(&pathentry->rw_lock);
|
||||
out += sprintf(out, "%s\n", (pathentry->devpath.flags & knob) ?
|
||||
out += sprintf(out, "%s\n", (pathentry->devpath.path.flags & knob) ?
|
||||
"On" : "Off");
|
||||
read_unlock(&pathentry->rw_lock);
|
||||
|
||||
|
@ -594,8 +594,8 @@ static ssize_t pdcs_timer_read(struct kobject *kobj,
|
|||
|
||||
/* print the timer value in seconds */
|
||||
read_lock(&pathentry->rw_lock);
|
||||
out += sprintf(out, "%u\n", (pathentry->devpath.flags & PF_TIMER) ?
|
||||
(1 << (pathentry->devpath.flags & PF_TIMER)) : 0);
|
||||
out += sprintf(out, "%u\n", (pathentry->devpath.path.flags & PF_TIMER) ?
|
||||
(1 << (pathentry->devpath.path.flags & PF_TIMER)) : 0);
|
||||
read_unlock(&pathentry->rw_lock);
|
||||
|
||||
return out - buf;
|
||||
|
@ -764,7 +764,7 @@ static ssize_t pdcs_auto_write(struct kobject *kobj,
|
|||
|
||||
/* Be nice to the existing flag record */
|
||||
read_lock(&pathentry->rw_lock);
|
||||
flags = pathentry->devpath.flags;
|
||||
flags = pathentry->devpath.path.flags;
|
||||
read_unlock(&pathentry->rw_lock);
|
||||
|
||||
DPRINTK("%s: flags before: 0x%X\n", __func__, flags);
|
||||
|
@ -785,7 +785,7 @@ static ssize_t pdcs_auto_write(struct kobject *kobj,
|
|||
write_lock(&pathentry->rw_lock);
|
||||
|
||||
/* Change the path entry flags first */
|
||||
pathentry->devpath.flags = flags;
|
||||
pathentry->devpath.path.flags = flags;
|
||||
|
||||
/* Now, dive in. Write back to the hardware */
|
||||
pdcspath_store(pathentry);
|
||||
|
|
|
@ -116,9 +116,9 @@ config SERIAL_8250_CONSOLE
|
|||
|
||||
If unsure, say N.
|
||||
|
||||
config SERIAL_8250_GSC
|
||||
config SERIAL_8250_PARISC
|
||||
tristate
|
||||
depends on SERIAL_8250 && GSC
|
||||
depends on SERIAL_8250 && PARISC
|
||||
default SERIAL_8250
|
||||
|
||||
config SERIAL_8250_DMA
|
||||
|
|
|
@ -12,7 +12,7 @@ obj-$(CONFIG_SERIAL_8250) += 8250.o 8250_base.o
|
|||
8250_base-$(CONFIG_SERIAL_8250_DMA) += 8250_dma.o
|
||||
8250_base-$(CONFIG_SERIAL_8250_DWLIB) += 8250_dwlib.o
|
||||
8250_base-$(CONFIG_SERIAL_8250_FINTEK) += 8250_fintek.o
|
||||
obj-$(CONFIG_SERIAL_8250_GSC) += 8250_gsc.o
|
||||
obj-$(CONFIG_SERIAL_8250_PARISC) += 8250_parisc.o
|
||||
obj-$(CONFIG_SERIAL_8250_PCI) += 8250_pci.o
|
||||
obj-$(CONFIG_SERIAL_8250_EXAR) += 8250_exar.o
|
||||
obj-$(CONFIG_SERIAL_8250_HP300) += 8250_hp300.o
|
||||
|
|
Загрузка…
Ссылка в новой задаче