amba uarts - arm type uarts fifo size provided by device tree
Subsystems (3)
[PATCH 1/2] Documentation: bindings: add optional fifo size property [PATCH 2/2] drivers/tty: pl011: read fifo size from OF if present
These patches aim at resolving an issue present on some of the amba pl011 uarts.
Some of these arm type uarts have their fifo sizes not defined in terms of the amba_rev register.
Those uarts should be able to declare their fifo sizes using the optional property "fifo-size" in the device tree. This device tree setting shall take precedence over any other values.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 1424285593-2886-1-git-send-email-jorge.ramirez-ortiz-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
PATCH 1/2 Documentation: bindings: add optional fifo size property to AMBA UARTs
--- Documentation/devicetree/bindings/serial/pl011.txt | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/serial/pl011.txt +1 -0
@@ -13,5 +13,6 @@ Optional properties: - dmas: When present, may have one or two dma channels. The first one must be named "rx", the second one must be named "tx". +- fifo-size: When present, must have the fifo size. See also bindings/arm/primecell.txt
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 drivers/tty: pl011: read fifo size from OF if present
In reply to a message not in the archive--- drivers/tty/serial/amba-pl011.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/tty/serial/amba-pl011.c +6 -0
@@ -84,6 +84,12 @@ struct vendor_data {static unsigned int get_fifosize_arm (struct amba_device *dev) { +const void *prop; + + prop =of_get_property (dev->dev.of_node,"fifo-size" ,NULL ); +if (prop) +return of_read_ulong (prop,1 ); +return amba_rev (dev) <3 ?16 :32 ; }
Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 drivers/tty: pl011: read fifo size from OF if present
Quoted 10 lines · Jorge Ramirez-Ortiz
Signed-off-by Jorge Ramirez-Ortiz <[email protected]>--- drivers/tty/serial/amba-pl011.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/tty/serial/amba-pl011.c +0
-0
drivers/tty/serial/amba-pl011.c struct vendor_data { · line 91
Quoted 8 lines
drivers/tty/serial/amba-pl011.c +5
-0@@ -84,6 +84,12 @@ struct vendor_data {static unsigned int get_fifosize_arm (struct amba_device *dev) { +const void *prop; + + prop =of_get_property (dev->dev.of_node,"fifo-size" ,NULL ); +if (prop) +return of_read_ulong (prop,1 );
Use of_property_read_u32.
You will need to sanity check the result, also.
What value do you need for your platform?
Mark.
Quoted 12 lines
drivers/tty/serial/amba-pl011.c +1
-0+return amba_rev (dev) <3 ?16 :32 ; }Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi,
Please Cc lakml for patches in this area in future.
Quoted 6 lines · Jorge Ramirez-Ortiz
[PATCH 1/2] Documentation: bindings: add optional fifo size property [PATCH 2/2]
drivers/tty: pl011: read fifo size from OF if presentThese patches aim at resolving an issue present on some of the amba pl011 uarts.
Which systems are affected? Neither of your two patches add the property to any dts file.
Quoted 2 lines
Some of these arm type uarts have their fifo sizes not defined in terms of the
amba_revregister.
What does said register actually contain?
Is this a full PL011, or a cut-down SBSA UART?
Mark.
Quoted 10 lines
Those uarts should be able to declare their fifo sizes using the optional property "fifo-size" in the device tree. This device tree setting shall take precedence over any other values.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 5 lines · Mark Rutland
Hi,
Please Cc lakml for patches in this area in future.
On Wed, Feb 18, 2015 at 06:53:11PM +0000, Jorge Ramirez-Ortiz wrote:
Quoted 8 lines
Quoted 6 lines
[PATCH 1/2] Documentation: bindings: add optional fifo size property [PATCH 2/2]
drivers/tty: pl011: read fifo size from OF if presentThese patches aim at resolving an issue present on some of the amba pl011 uarts.
Which systems are affected? Neither of your two patches add the property to any dts file.
yes, the system affected is still under revision (I should have mentioned)
https://lkml.org/lkml/2015/2/5/144
this is the board I am using to test
https://www.96boards.org/products/hikey/
Quoted 4 lines
Quoted 3 lines
Some of these arm type uarts have their fifo sizes not defined in terms of the
amba_revregister.What does said register actually contain?
the amba_rev contains '1' for the Hisilicon Hi6220 SoC
Quoted 2 lines
Is this a full PL011, or a cut-down SBSA UART?
I believe is full PL011 (ARM type) - that is what is being run in my tests.
Quoted 13 lines
Mark.
Quoted 10 lines
Those uarts should be able to declare their fifo sizes using the optional property "fifo-size" in the device tree. This device tree setting shall take precedence over any other values.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 10 lines · Jorge Ramirez-Ortiz
Quoted 9 lines · Mark Rutland
Hi,
Please Cc lakml for patches in this area in future.
Quoted 4 lines · Jorge Ramirez-Ortiz
[PATCH 1/2] Documentation: bindings: add optional fifo size property [PATCH 2/2]
drivers/tty: pl011: read fifo size from OF if present
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
These patches aim at resolving an issue present on some of the amba pl011 uarts.
Which systems are affected? Neither of your two patches add the property to any dts file.
yes, the system affected is still under revision (I should have mentioned)
https://lkml.org/lkml/2015/2/5/144
Sorry, I can't follow that thread. What FIFO size do your UARTs have? What is the full ID of the UARTs?
Signature · 2 lines
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up according to speedtest.net.
Quoted 13 lines · Russell King - ARM Linux
Quoted 12 lines · Jorge Ramirez-Ortiz
Quoted 11 lines · Mark Rutland
Hi,
Please Cc lakml for patches in this area in future.
Quoted 6 lines · Jorge Ramirez-Ortiz
[PATCH 1/2] Documentation: bindings: add optional fifo size property [PATCH 2/2]
drivers/tty: pl011: read fifo size from OF if presentThese patches aim at resolving an issue present on some of the amba pl011 uarts.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Which systems are affected? Neither of your two patches add the property to any dts file.
yes, the system affected is still under revision (I should have mentioned)
https://lkml.org/lkml/2015/2/5/144Sorry, I can't follow that thread. What FIFO size do your UARTs have? What is the full ID of the UARTs?
I just added a temporary printk to my logs for clarity
[ 3.328845] name = f7111000.uart, id = 0x241011, amba_rev = 2, fifo size = 64