diff options
author | Tom Rini <trini@konsulko.com> | 2019-03-11 11:24:20 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-03-11 11:24:20 -0400 |
commit | 6a08213d52f036dbfbdd92f1416bc4b08fd4d3f6 (patch) | |
tree | 6b2292e4cfb440166694f8715b8bb53ab38414af /arch | |
parent | 19c8c9c1031ebf345a68728d6f06d943207cea0f (diff) | |
parent | 3592965aff313a379f6f10faa05c997391c5dd82 (diff) | |
download | u-boot-6a08213d52f036dbfbdd92f1416bc4b08fd4d3f6.tar.gz |
Merge git://git.denx.de/u-boot-x86
- ACPI changes and fixes to Intel Tangier/Edison
- i8254 beeper fixes
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/dts/coreboot.dts | 1 | ||||
-rw-r--r-- | arch/x86/dts/crownbay.dts | 1 | ||||
-rw-r--r-- | arch/x86/dts/edison.dts | 22 | ||||
-rw-r--r-- | arch/x86/dts/pcspkr.dtsi | 5 | ||||
-rw-r--r-- | arch/x86/include/asm/arch-tangier/acpi/southcluster.asl | 14 | ||||
-rw-r--r-- | arch/x86/lib/acpi_table.c | 6 | ||||
-rw-r--r-- | arch/x86/lib/i8254.c | 4 |
7 files changed, 48 insertions, 5 deletions
diff --git a/arch/x86/dts/coreboot.dts b/arch/x86/dts/coreboot.dts index e212f3dc7d..a88da6eafd 100644 --- a/arch/x86/dts/coreboot.dts +++ b/arch/x86/dts/coreboot.dts @@ -10,6 +10,7 @@ /include/ "skeleton.dtsi" /include/ "serial.dtsi" /include/ "keyboard.dtsi" +/include/ "pcspkr.dtsi" /include/ "reset.dtsi" /include/ "rtc.dtsi" /include/ "tsc_timer.dtsi" diff --git a/arch/x86/dts/crownbay.dts b/arch/x86/dts/crownbay.dts index 2ffcc5f27e..8938a94e77 100644 --- a/arch/x86/dts/crownbay.dts +++ b/arch/x86/dts/crownbay.dts @@ -10,6 +10,7 @@ /include/ "skeleton.dtsi" /include/ "serial.dtsi" /include/ "keyboard.dtsi" +/include/ "pcspkr.dtsi" /include/ "reset.dtsi" /include/ "rtc.dtsi" /include/ "tsc_timer.dtsi" diff --git a/arch/x86/dts/edison.dts b/arch/x86/dts/edison.dts index ca8dfb4287..e8564bbb8a 100644 --- a/arch/x86/dts/edison.dts +++ b/arch/x86/dts/edison.dts @@ -18,10 +18,12 @@ aliases { serial0 = &serial0; + serial1 = &serial1; + serial2 = &serial2; }; chosen { - stdout-path = &serial0; + stdout-path = &serial2; }; cpus { @@ -53,7 +55,23 @@ 0x01000000 0x0 0x2000 0x2000 0 0xe000>; }; - serial0: serial@ff010180 { + serial0: serial@ff010080 { + compatible = "intel,mid-uart"; + reg = <0xff010080 0x100>; + reg-shift = <0>; + clock-frequency = <29491200>; + current-speed = <115200>; + }; + + serial1: serial@ff010100 { + compatible = "intel,mid-uart"; + reg = <0xff010100 0x100>; + reg-shift = <0>; + clock-frequency = <29491200>; + current-speed = <115200>; + }; + + serial2: serial@ff010180 { compatible = "intel,mid-uart"; reg = <0xff010180 0x100>; reg-shift = <0>; diff --git a/arch/x86/dts/pcspkr.dtsi b/arch/x86/dts/pcspkr.dtsi new file mode 100644 index 0000000000..934ab1028d --- /dev/null +++ b/arch/x86/dts/pcspkr.dtsi @@ -0,0 +1,5 @@ +/ { + pcspkr { + compatible = "i8254,beeper"; + }; +}; diff --git a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl index baad98b1c7..8b5b709045 100644 --- a/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl +++ b/arch/x86/include/asm/arch-tangier/acpi/southcluster.asl @@ -179,6 +179,9 @@ Device (PCI0) "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 112 } GpioIo(Exclusive, PullUp, 0, 0, IoRestrictionOutputOnly, "\\_SB.PCI0.GPIO", 0, ResourceConsumer, , ) { 113 } + + FixedDMA(0x000d, 0x0002, Width32bit, ) + FixedDMA(0x000c, 0x0003, Width32bit, ) }) Method (_CRS, 0, NotSerialized) @@ -219,6 +222,17 @@ Device (PCI0) { Return (STA_VISIBLE) } + + Name (RBUF, ResourceTemplate() + { + FixedDMA(0x0009, 0x0000, Width32bit, ) + FixedDMA(0x0008, 0x0001, Width32bit, ) + }) + + Method (_CRS, 0, NotSerialized) + { + Return (RBUF) + } } Device (I2C6) diff --git a/arch/x86/lib/acpi_table.c b/arch/x86/lib/acpi_table.c index 04058a60d7..270274f6b3 100644 --- a/arch/x86/lib/acpi_table.c +++ b/arch/x86/lib/acpi_table.c @@ -347,7 +347,7 @@ static void acpi_create_spcr(struct acpi_spcr *spcr) uint serial_width; int access_size; int space_id; - int ret; + int ret = -ENODEV; /* Fill out header fields */ acpi_fill_header(header, "SPCR"); @@ -355,8 +355,8 @@ static void acpi_create_spcr(struct acpi_spcr *spcr) header->revision = 2; /* Read the device once, here. It is reused below */ - ret = uclass_first_device_err(UCLASS_SERIAL, &dev); - if (!ret) + dev = gd->cur_serial_dev; + if (dev) ret = serial_getinfo(dev, &serial_info); if (ret) serial_info.type = SERIAL_CHIP_UNKNOWN; diff --git a/arch/x86/lib/i8254.c b/arch/x86/lib/i8254.c index d0227954b1..0f97538910 100644 --- a/arch/x86/lib/i8254.c +++ b/arch/x86/lib/i8254.c @@ -51,6 +51,10 @@ int i8254_enable_beep(uint frequency_hz) if (!frequency_hz) return -EINVAL; + /* make sure i8254 is setup correctly before generating beeps */ + outb(PIT_CMD_CTR2 | PIT_CMD_BOTH | PIT_CMD_MODE3, + PIT_BASE + PIT_COMMAND); + i8254_set_beep_freq(frequency_hz); setio_8(SYSCTL_PORTB, PORTB_BEEP_ENABLE); |