[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1469035277-40919-2-git-send-email-Zubair.Kakakhel@imgtec.com>
Date: Wed, 20 Jul 2016 18:21:15 +0100
From: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@...tec.com>
To: <gregkh@...uxfoundation.org>, <arnd@...db.de>
CC: <jslaby@...e.com>, <linux-kernel@...r.kernel.org>,
<linux-serial@...r.kernel.org>, <Zubair.Kakakhel@...tec.com>
Subject: [RFC 1/3] misc: pch_phub: Read prefetch value from device tree if passed
The default prefetch value for the eg20t device is hard coded to
0x000affaa.
Add support for an alternative to be read from DT if available
Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@...tec.com>
---
drivers/misc/pch_phub.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/pch_phub.c b/drivers/misc/pch_phub.c
index 4810e03..9b010a7 100644
--- a/drivers/misc/pch_phub.c
+++ b/drivers/misc/pch_phub.c
@@ -711,6 +711,12 @@ static int pch_phub_probe(struct pci_dev *pdev,
if (id->driver_data == 1) { /* EG20T PCH */
const char *board_name;
+ unsigned int prefetch = 0x000affaa;
+
+ if (pdev->dev.of_node)
+ of_property_read_u32(pdev->dev.of_node,
+ "intel,eg20t-prefetch",
+ &prefetch);
ret = sysfs_create_file(&pdev->dev.kobj,
&dev_attr_pch_mac.attr);
@@ -736,7 +742,7 @@ static int pch_phub_probe(struct pci_dev *pdev,
CLKCFG_UART_MASK);
/* set the prefech value */
- iowrite32(0x000affaa, chip->pch_phub_base_address + 0x14);
+ iowrite32(prefetch, chip->pch_phub_base_address + 0x14);
/* set the interrupt delay value */
iowrite32(0x25, chip->pch_phub_base_address + 0x44);
chip->pch_opt_rom_start_address = PCH_PHUB_ROM_START_ADDR_EG20T;
--
1.9.1
Powered by blists - more mailing lists