forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/arch/sh/drivers/pci/pci-sh7780.c
....@@ -1,11 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Low-Level PCI Support for the SH7780
34 *
45 * Copyright (C) 2005 - 2010 Paul Mundt
5
- *
6
- * This file is subject to the terms and conditions of the GNU General Public
7
- * License. See the file "COPYING" in the main directory of this archive
8
- * for more details.
96 */
107 #include <linux/types.h>
118 #include <linux/kernel.h>
....@@ -19,7 +16,7 @@
1916 #include <linux/log2.h>
2017 #include "pci-sh4.h"
2118 #include <asm/mmu.h>
22
-#include <asm/sizes.h>
19
+#include <linux/sizes.h>
2320
2421 #if defined(CONFIG_CPU_BIG_ENDIAN)
2522 # define PCICR_ENDIANNESS SH4_PCICR_BSWP
....@@ -151,7 +148,7 @@
151148
152149 printk(KERN_DEBUG "PCI: system error received: ");
153150 pcibios_report_status(PCI_STATUS_SIG_SYSTEM_ERROR, 1);
154
- printk("\n");
151
+ pr_cont("\n");
155152
156153 /* Deassert SERR */
157154 __raw_writel(SH4_PCIINTM_SDIM, hose->reg_base + SH4_PCIINTM);
....@@ -182,7 +179,7 @@
182179 ret = request_irq(hose->serr_irq, sh7780_pci_serr_irq, 0,
183180 "PCI SERR interrupt", hose);
184181 if (unlikely(ret)) {
185
- printk(KERN_ERR "PCI: Failed hooking SERR IRQ\n");
182
+ pr_err("PCI: Failed hooking SERR IRQ\n");
186183 return ret;
187184 }
188185
....@@ -253,7 +250,7 @@
253250 const char *type;
254251 int ret, i;
255252
256
- printk(KERN_NOTICE "PCI: Starting initialization.\n");
253
+ pr_notice("PCI: Starting initialization.\n");
257254
258255 chan->reg_base = 0xfe040000;
259256
....@@ -273,7 +270,7 @@
273270
274271 id = __raw_readw(chan->reg_base + PCI_VENDOR_ID);
275272 if (id != PCI_VENDOR_ID_RENESAS) {
276
- printk(KERN_ERR "PCI: Unknown vendor ID 0x%04x.\n", id);
273
+ pr_err("PCI: Unknown vendor ID 0x%04x.\n", id);
277274 return -ENODEV;
278275 }
279276
....@@ -284,14 +281,13 @@
284281 (id == PCI_DEVICE_ID_RENESAS_SH7785) ? "SH7785" :
285282 NULL;
286283 if (unlikely(!type)) {
287
- printk(KERN_ERR "PCI: Found an unsupported Renesas host "
288
- "controller, device id 0x%04x.\n", id);
284
+ pr_err("PCI: Found an unsupported Renesas host controller, device id 0x%04x.\n",
285
+ id);
289286 return -EINVAL;
290287 }
291288
292
- printk(KERN_NOTICE "PCI: Found a Renesas %s host "
293
- "controller, revision %d.\n", type,
294
- __raw_readb(chan->reg_base + PCI_REVISION_ID));
289
+ pr_notice("PCI: Found a Renesas %s host controller, revision %d.\n",
290
+ type, __raw_readb(chan->reg_base + PCI_REVISION_ID));
295291
296292 /*
297293 * Now throw it in to register initialization mode and
....@@ -398,9 +394,9 @@
398394
399395 sh7780_pci66_init(chan);
400396
401
- printk(KERN_NOTICE "PCI: Running at %dMHz.\n",
402
- (__raw_readw(chan->reg_base + PCI_STATUS) & PCI_STATUS_66MHZ) ?
403
- 66 : 33);
397
+ pr_notice("PCI: Running at %dMHz.\n",
398
+ (__raw_readw(chan->reg_base + PCI_STATUS) & PCI_STATUS_66MHZ)
399
+ ? 66 : 33);
404400
405401 return 0;
406402