Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53f01bba authored by Matthew Wilcox's avatar Matthew Wilcox Committed by Kyle McMartin
Browse files

[PARISC] Convert parisc_device to use struct resource for hpa



Convert pa_dev->hpa from an unsigned long to a struct resource.

Signed-off-by: default avatarMatthew Wilcox <willy@parisc-linux.org>

Fix up users of ->hpa to use ->hpa.start instead.

Signed-off-by: default avatarMatthew Wilcox <willy@parisc-linux.org>

Signed-off-by: default avatarKyle McMartin <kyle@parisc-linux.org>
parent bdad1f83
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -746,7 +746,8 @@ static int perf_write_image(uint64_t *memaddr)
	uint64_t *bptr;
	uint32_t dwords;
	uint32_t *intrigue_rdr;
	uint64_t *intrigue_bitmask, tmp64, proc_hpa;
	uint64_t *intrigue_bitmask, tmp64;
	void __iomem *runway;
	struct rdr_tbl_ent *tentry;
	int i;

@@ -798,15 +799,16 @@ static int perf_write_image(uint64_t *memaddr)
		return -1;
	}

	proc_hpa = cpu_device->hpa;
	runway = ioremap(cpu_device->hpa.start, 4096);

	/* Merge intrigue bits into Runway STATUS 0 */
	tmp64 = __raw_readq(proc_hpa + RUNWAY_STATUS) & 0xffecfffffffffffful;
	__raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul), proc_hpa + RUNWAY_STATUS);
	tmp64 = __raw_readq(runway + RUNWAY_STATUS) & 0xffecfffffffffffful;
	__raw_writeq(tmp64 | (*memaddr++ & 0x0013000000000000ul), 
		     runway + RUNWAY_STATUS);
	
	/* Write RUNWAY DEBUG registers */
	for (i = 0; i < 8; i++) {
		__raw_writeq(*memaddr++, proc_hpa + RUNWAY_DEBUG + i);
		__raw_writeq(*memaddr++, runway + RUNWAY_DEBUG);
	}

	return 0; 
+4 −4
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ static int __init processor_probe(struct parisc_device *dev)
	 * May get overwritten by PAT code.
	 */
	cpuid = boot_cpu_data.cpu_count;
	txn_addr = dev->hpa;	/* for legacy PDC */
	txn_addr = dev->hpa.start;	/* for legacy PDC */

#ifdef __LP64__
	if (is_pdc_pat()) {
@@ -122,7 +122,7 @@ static int __init processor_probe(struct parisc_device *dev)
 * boot time (ie shutdown a CPU from an OS perspective).
 */
		/* get the cpu number */
		status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa);
		status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa.start);

		BUG_ON(PDC_OK != status);

@@ -130,7 +130,7 @@ static int __init processor_probe(struct parisc_device *dev)
			printk(KERN_WARNING "IGNORING CPU at 0x%x,"
				" cpu_slot_id > NR_CPUS"
				" (%ld > %d)\n",
				dev->hpa, cpu_info.cpu_num, NR_CPUS);
				dev->hpa.start, cpu_info.cpu_num, NR_CPUS);
			/* Ignore CPU since it will only crash */
			boot_cpu_data.cpu_count--;
			return 1;
@@ -149,7 +149,7 @@ static int __init processor_probe(struct parisc_device *dev)

	p->loops_per_jiffy = loops_per_jiffy;
	p->dev = dev;		/* Save IODC data in case we need it */
	p->hpa = dev->hpa;	/* save CPU hpa */
	p->hpa = dev->hpa.start;	/* save CPU hpa */
	p->cpuid = cpuid;	/* save CPU id */
	p->txn_addr = txn_addr;	/* save CPU IRQ address */
#ifdef CONFIG_SMP
+2 −2
Original line number Diff line number Diff line
@@ -278,11 +278,11 @@ static int __init
hil_init_chip(struct parisc_device *dev)
{
	if (!dev->irq) {
		printk(KERN_WARNING "HIL: IRQ not found for HIL bus at 0x%08lx\n", dev->hpa);
		printk(KERN_WARNING "HIL: IRQ not found for HIL bus at 0x%08lx\n", dev->hpa.start);
		return -ENODEV;
	}

	hil_base = dev->hpa;
	hil_base = dev->hpa.start;
	hil_irq  = dev->irq;
	hil_dev.dev_id = dev;
	
+1 −1
Original line number Diff line number Diff line
@@ -331,7 +331,7 @@ static int __init gscps2_probe(struct parisc_device *dev)
{
	struct gscps2port *ps2port;
	struct serio *serio;
	unsigned long hpa = dev->hpa;
	unsigned long hpa = dev->hpa.start;
	int ret;

	if (!dev->irq)
+3 −3
Original line number Diff line number Diff line
@@ -875,9 +875,9 @@ static int __init hp_sdc_init_hppa(struct parisc_device *d)
	hp_sdc.dev		= d;
	hp_sdc.irq		= d->irq;
	hp_sdc.nmi		= d->aux_irq;
	hp_sdc.base_io		= d->hpa;
	hp_sdc.data_io		= d->hpa + 0x800;
	hp_sdc.status_io	= d->hpa + 0x801;
	hp_sdc.base_io		= d->hpa.start;
	hp_sdc.data_io		= d->hpa.start + 0x800;
	hp_sdc.status_io	= d->hpa.start + 0x801;

	return hp_sdc_init();
}
Loading