mail.coreboot.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
List overview
Download
coreboot-gerrit
October 2020
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
coreboot-gerrit@coreboot.org
1 participants
3474 discussions
Start a n
N
ew thread
Change in coreboot[master]: nb/intel/pineview: Use new mchbar{8,16,32}_and_or()
by HAOUAS Elyes (Code Review)
17 Feb '21
17 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/45517
) Change subject: nb/intel/pineview: Use new mchbar{8,16,32}_and_or() ...................................................................... nb/intel/pineview: Use new mchbar{8,16,32}_and_or() Change-Id: I5fa844a8a13a75d6d802ca48f72c513bfa16d0a5 Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- A src/northbridge/intel/common/mchbar_ops.c A src/northbridge/intel/common/mchbar_ops.h M
…
[View More]
src/northbridge/intel/pineview/Makefile.inc M src/northbridge/intel/pineview/early_init.c M src/northbridge/intel/pineview/pineview.h M src/northbridge/intel/pineview/raminit.c 6 files changed, 417 insertions(+), 344 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/17/45517/1 diff --git a/src/northbridge/intel/common/mchbar_ops.c b/src/northbridge/intel/common/mchbar_ops.c new file mode 100644 index 0000000..c3fccad --- /dev/null +++ b/src/northbridge/intel/common/mchbar_ops.c @@ -0,0 +1,61 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <stdint.h> +#include "mchbar_ops.h" + +void mchbar8_and_or(int offset, u8 mask, u8 or) +{ + u8 reg8 = MCHBAR8(offset); + + reg8 &= mask; + reg8 |= or; + MCHBAR8(offset) = reg8; +} + +void mchbar16_and_or(int offset, u16 mask, u16 or) +{ + u16 reg16 = MCHBAR32(offset); + + reg16 &= mask; + reg16 |= or; + MCHBAR16(offset) = reg16; +} + +void mchbar32_and_or(int offset, u32 mask, u32 or) +{ + u32 reg32 = MCHBAR32(offset); + + reg32 &= mask; + reg32 |= or; + MCHBAR32(offset) = reg32; +} + +void mchbar8_and(int offset, u8 and) +{ + mchbar8_and_or(offset, and, 0); +} + +void mchbar16_and(int offset, u16 and) +{ + mchbar16_and_or(offset, and, 0); +} + +void mchbar32_and(int offset, u32 and) +{ + mchbar32_and_or(offset, and, 0); +} + +void mchbar8_or(int offset, u8 or) +{ + mchbar8_and_or(offset, 0xff, or); +} + +void mchbar16_or(int offset, u16 or) +{ + mchbar16_and_or(offset, 0xffff, or); +} + +void mchbar32_or(int offset, u32 or) +{ + mchbar32_and_or(offset, 0xffffffff, or); +} diff --git a/src/northbridge/intel/common/mchbar_ops.h b/src/northbridge/intel/common/mchbar_ops.h new file mode 100644 index 0000000..cf39c2b --- /dev/null +++ b/src/northbridge/intel/common/mchbar_ops.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#ifndef MCHBAR_OPS_H +#define MCHBAR_OPS_H + +#include <stdint.h> +#include <northbridge/intel/pineview/memmap.h> + +#define MCHBAR8(x) (*((volatile u8 *)(DEFAULT_MCHBAR + x))) +#define MCHBAR16(x) (*((volatile u16 *)(DEFAULT_MCHBAR + x))) +#define MCHBAR32(x) (*((volatile u32 *)(DEFAULT_MCHBAR + x))) + +void mchbar8_and_or(int offset, u8 mask, u8 or); +void mchbar16_and_or(int offset, u16 mask, u16 or); +void mchbar32_and_or(int offset, u32 mask, u32 or); +void mchbar8_and(int offset, u8 and); +void mchbar16_and(int offset, u16 and); +void mchbar32_and(int offset, u32 and); +void mchbar8_or(int offset, u8 or); +void mchbar16_or(int offset, u16 or); +void mchbar32_or(int offset, u32 or); + +#endif diff --git a/src/northbridge/intel/pineview/Makefile.inc b/src/northbridge/intel/pineview/Makefile.inc index 08e04f2..4ba902e 100644 --- a/src/northbridge/intel/pineview/Makefile.inc +++ b/src/northbridge/intel/pineview/Makefile.inc @@ -14,6 +14,7 @@ romstage-y += memmap.c romstage-y += raminit.c romstage-y += early_init.c +romstage-y += ../common/mchbar_ops.c postcar-y += memmap.c diff --git a/src/northbridge/intel/pineview/early_init.c b/src/northbridge/intel/pineview/early_init.c index 42a68d8..ec7c575 100644 --- a/src/northbridge/intel/pineview/early_init.c +++ b/src/northbridge/intel/pineview/early_init.c @@ -3,6 +3,7 @@ #include <console/console.h> #include <device/pci_ops.h> #include <device/pci_def.h> +#include <northbridge/intel/common/mchbar_ops.h> #include <northbridge/intel/pineview/pineview.h> #include <northbridge/intel/pineview/chip.h> #include <option.h> @@ -67,10 +68,10 @@ if (config->use_crt) { /* Enable VGA */ - MCHBAR32_OR(DACGIOCTRL1, 1 << 15); + mchbar32_or(DACGIOCTRL1, 1 << 15); } else { /* Disable VGA */ - MCHBAR32_AND(DACGIOCTRL1, ~(1 << 15)); + mchbar32_and(DACGIOCTRL1, ~(1 << 15)); } if (config->use_lvds) { @@ -79,17 +80,17 @@ reg32 &= ~0xf1000000; reg32 |= 0x90000000; MCHBAR32(LVDSICR2) = reg32; - MCHBAR32_OR(IOCKTRR1, 1 << 9); + mchbar32_or(IOCKTRR1, 1 << 9); } else { /* Disable LVDS */ - MCHBAR32_OR(DACGIOCTRL1, 3 << 25); + mchbar32_or(DACGIOCTRL1, 3 << 25); } MCHBAR32(CICTRL) = 0xc6db8b5f; MCHBAR16(CISDCTRL) = 0x024f; - MCHBAR32_AND(DACGIOCTRL1, 0xffffff00); - MCHBAR32_OR(DACGIOCTRL1, 1 << 5); + mchbar32_and(DACGIOCTRL1, 0xffffff00); + mchbar32_or(DACGIOCTRL1, 1 << 5); /* Legacy backlight control */ pci_write_config8(GMCH_IGD, 0xf4, 0x4c); diff --git a/src/northbridge/intel/pineview/pineview.h b/src/northbridge/intel/pineview/pineview.h index 03fa318..121c65b 100644 --- a/src/northbridge/intel/pineview/pineview.h +++ b/src/northbridge/intel/pineview/pineview.h @@ -5,6 +5,7 @@ #include <northbridge/intel/pineview/memmap.h> #include <southbridge/intel/i82801gx/i82801gx.h> +#include <northbridge/intel/common/mchbar_ops.h> #define BOOT_PATH_NORMAL 0 #define BOOT_PATH_RESET 1 @@ -36,23 +37,8 @@ /* * MCHBAR + *As there are many registers, define them on a separate file */ - -#define MCHBAR8(x) (*((volatile u8 *)(DEFAULT_MCHBAR + (x)))) -#define MCHBAR16(x) (*((volatile u16 *)(DEFAULT_MCHBAR + (x)))) -#define MCHBAR32(x) (*((volatile u32 *)(DEFAULT_MCHBAR + x))) /* FIXME: causes changes */ -#define MCHBAR8_AND(x, and) (MCHBAR8(x) = MCHBAR8(x) & (and)) -#define MCHBAR16_AND(x, and) (MCHBAR16(x) = MCHBAR16(x) & (and)) -#define MCHBAR32_AND(x, and) (MCHBAR32(x) = MCHBAR32(x) & (and)) -#define MCHBAR8_OR(x, or) (MCHBAR8(x) = MCHBAR8(x) | (or)) -#define MCHBAR16_OR(x, or) (MCHBAR16(x) = MCHBAR16(x) | (or)) -#define MCHBAR32_OR(x, or) (MCHBAR32(x) = MCHBAR32(x) | (or)) -#define MCHBAR8_AND_OR(x, and, or) (MCHBAR8(x) = (MCHBAR8(x) & (and)) | (or)) -#define MCHBAR16_AND_OR(x, and, or) (MCHBAR16(x) = (MCHBAR16(x) & (and)) | (or)) -#define MCHBAR32_AND_OR(x, and, or) (MCHBAR32(x) = (MCHBAR32(x) & (and)) | (or)) - -/* As there are many registers, define them on a separate file */ - #include "mchbar_regs.h" /* diff --git a/src/northbridge/intel/pineview/raminit.c b/src/northbridge/intel/pineview/raminit.c index 43149be..b190781 100644 --- a/src/northbridge/intel/pineview/raminit.c +++ b/src/northbridge/intel/pineview/raminit.c @@ -8,6 +8,7 @@ #include <console/console.h> #include <delay.h> #include <lib.h> +#include <northbridge/intel/common/mchbar_ops.h> #include "pineview.h" #include "raminit.h" #include <spd.h> @@ -501,7 +502,7 @@ if (s->boot_path == BOOT_PATH_RESET) return; - MCHBAR32_OR(PMSTS, 1); + mchbar32_or(PMSTS, 1); reg32 = (MCHBAR32(CLKCFG) & ~0x70) | (1 << 10); if (s->selected_timings.mem_clock == MEM_CLOCK_800MHz) { @@ -566,7 +567,7 @@ MCHBAR32(HMCCPEXT) = 0; MCHBAR32(HMDCPEXT) = clkcross[fsb_freq][ddr_freq][3]; - MCHBAR32_OR(HMCCMC, 1 << 7); + mchbar32_or(HMCCMC, 1 << 7); if ((fsb_freq == 0) && (ddr_freq == 1)) { MCHBAR8(CLKXSSH2MCBYPPHAS) = 0; @@ -616,8 +617,8 @@ u8 ddr_freq; u16 mpll_ctl; - MCHBAR16_AND(CSHRMISCCTL1, ~(1 << 8)); - MCHBAR8_AND(CSHRMISCCTL1, ~0x3f); + mchbar16_and(CSHRMISCCTL1, (u16)~(1 << 8)); + mchbar8_and(CSHRMISCCTL1, (u8)~0x3f); if (s->selected_timings.mem_clock == MEM_CLOCK_667MHz) { ddr_freq = 0; @@ -627,10 +628,10 @@ mpll_ctl = (1 << 8) | (1 << 5); } if (s->boot_path != BOOT_PATH_RESET) - MCHBAR16_AND_OR(MPLLCTL, ~(0x033f), mpll_ctl); + mchbar16_and_or(MPLLCTL, (u16)~(0x033f), mpll_ctl); MCHBAR32(C0GNT2LNCH1) = 0x58001117; - MCHBAR32_OR(C0STATRDCTRL, 1 << 23); + mchbar32_or(C0STATRDCTRL, 1 << 23); const u32 cas_to_reg[2][4] = { {0x00000000, 0x00030100, 0x0C240201, 0x00000000}, /* DDR = 667 */ @@ -682,7 +683,7 @@ flag = 1; } - MCHBAR8_OR(C0PVCFG, 0x03); + mchbar8_or(C0PVCFG, 0x03); MCHBAR16(C0CYCTRKPCHG) = ((wl + 4 + s->selected_timings.tWR) << 6) | ((2 + MAX(s->selected_timings.tRTP, 2)) << 2) | 1; @@ -699,7 +700,7 @@ /* FIXME: Only applies to DDR2 */ reg16 = (MCHBAR16(C0CYCTRKACT + 2) & 0x0fc0) >> 6; - MCHBAR16_AND_OR(SHCYCTRKCKEL, ~0x1f80, (reg16 << 7)); + mchbar16_and_or(SHCYCTRKCKEL, (u16)~0x1f80, (reg16 << 7)); reg16 = (s->selected_timings.tRCD << 12) | (4 << 8) | (ta2 << 4) | ta4; MCHBAR16(C0CYCTRKWR) = reg16; @@ -714,10 +715,10 @@ MCHBAR8(C0CYCTRKREFR) = (u8) (reg16); MCHBAR8(C0CYCTRKREFR + 1) = (u8) (reg16 >> 8); - MCHBAR16_AND_OR(C0CKECTRL, ~0x03fe, 100 << 1); - MCHBAR8_AND_OR(C0CYCTRKPCHG2, ~0x3f, s->selected_timings.tRAS); + mchbar16_and_or(C0CKECTRL, (u16)~0x03fe, 100 << 1); + mchbar8_and_or(C0CYCTRKPCHG2, (u8)~0x3f, s->selected_timings.tRAS); MCHBAR16(C0ARBCTRL) = 0x2310; - MCHBAR8_AND_OR(C0ADDCSCTRL, ~0x1f, 1); + mchbar8_and_or(C0ADDCSCTRL, (u8)~0x1f, 1); if (s->selected_timings.mem_clock == MEM_CLOCK_667MHz) { reg32 = 3000; @@ -730,7 +731,7 @@ reg2 = 5000; } reg16 = (u16)((((s->selected_timings.CAS + 7) * (reg32)) / reg2) << 8); - MCHBAR16_AND_OR(C0STATRDCTRL, ~0x1f00, reg16); + mchbar16_and_or(C0STATRDCTRL, (u16)~0x1f00, reg16); flag = 0; if (wl > 2) { @@ -739,13 +740,13 @@ reg16 = (u8) (wl - 1 - flag); reg16 |= reg16 << 4; reg16 |= flag << 8; - MCHBAR16_AND_OR(C0WRDATACTRL, ~0x01ff, reg16); + mchbar16_and_or(C0WRDATACTRL, (u16)~0x01ff, reg16); MCHBAR16(C0RDQCTRL) = 0x1585; - MCHBAR8_AND(C0PWLRCTRL, ~0x1f); + mchbar8_and(C0PWLRCTRL, (u8)~0x1f); /* rdmodwr_window[5..0] = CL+4+5 265[13..8] (264[21..16]) */ - MCHBAR16_AND_OR(C0PWLRCTRL, ~0x3f00, (s->selected_timings.CAS + 9) << 8); + mchbar16_and_or(C0PWLRCTRL, (u16)~0x3f00, (s->selected_timings.CAS + 9) << 8); if (s->selected_timings.mem_clock == MEM_CLOCK_667MHz) { reg16 = 0x0514; @@ -754,115 +755,115 @@ reg16 = 0x0618; reg32 = 0x0c30; } - MCHBAR32_AND_OR(C0REFRCTRL2, ~0x0fffff00, (0x3f << 22) | (reg32 << 8)); + mchbar32_and_or(C0REFRCTRL2, (u32)~0x0fffff00, (0x3f << 22) | (reg32 << 8)); /* FIXME: Is this weird access necessary? Reference code does it */ MCHBAR8(C0REFRCTRL + 3) = 0; - MCHBAR16_AND_OR(C0REFCTRL, 0xc000, reg16); + mchbar16_and_or(C0REFCTRL, 0xc000, reg16); /* NPUT Static Mode */ - MCHBAR8_OR(C0DYNRDCTRL, 1); + mchbar8_or(C0DYNRDCTRL, 1); - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x7f000000, 0xb << 25); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x7f000000, 0xb << 25); i = s->selected_timings.mem_clock; j = s->selected_timings.fsb_clock; if (i > j) { - MCHBAR32_OR(C0STATRDCTRL, 1 << 24); + mchbar32_or(C0STATRDCTRL, 1 << 24); } - MCHBAR8_AND(C0RDFIFOCTRL, ~0x3); - MCHBAR16_AND_OR(C0WRDATACTRL, ~0x7c00, (wl + 10) << 10); - MCHBAR32_AND_OR(C0CKECTRL, ~0x070e0000, (3 << 24) | (3 << 17)); + mchbar8_and(C0RDFIFOCTRL, (u8)~0x3); + mchbar16_and_or(C0WRDATACTRL, (u16)~0x7c00, (wl + 10) << 10); + mchbar32_and_or(C0CKECTRL, (u32)~0x070e0000, (3 << 24) | (3 << 17)); reg16 = 0x15 << 6; reg16 |= 0x1f; reg16 |= (0x6 << 12); - MCHBAR16_AND_OR(C0REFRCTRL + 4, ~0x7fff, reg16); + mchbar16_and_or(C0REFRCTRL + 4, (u16)~0x7fff, reg16); reg32 = (0x6 << 27) | (1 << 25); /* FIXME: For DDR3, set BIT26 as well */ - MCHBAR32_AND_OR(C0REFRCTRL2, ~0x30000000, reg32 << 8); - MCHBAR8_AND_OR(C0REFRCTRL + 3, ~0xfa, reg32 >> 24); - MCHBAR8_AND(C0JEDEC, ~(1 << 7)); - MCHBAR8_AND(C0DYNRDCTRL, ~0x6); + mchbar32_and_or(C0REFRCTRL2, (u32)~0x30000000, reg32 << 8); + mchbar8_and_or(C0REFRCTRL + 3, (u8)~0xfa, reg32 >> 24); + mchbar8_and(C0JEDEC, (u8)~(1 << 7)); + mchbar8_and(C0DYNRDCTRL, (u8)~0x6); /* Note: This is a 64-bit register, [34..30] = 0b00110 is split across two writes */ reg32 = ((6 & 3) << 30) | (4 << 25) | (1 << 20) | (8 << 15) | (6 << 10) | (4 << 5) | 1; MCHBAR32(C0WRWMFLSH) = reg32; - MCHBAR16_AND_OR(C0WRWMFLSH + 4, ~0x1ff, (8 << 3) | (6 >> 2)); - MCHBAR16_OR(SHPENDREG, 0x1c00 | (0x1f << 5)); + mchbar16_and_or(C0WRWMFLSH + 4, (u16)~0x1ff, (8 << 3) | (6 >> 2)); + mchbar16_or(SHPENDREG, 0x1c00 | (0x1f << 5)); /* FIXME: Why not do a single word write? */ - MCHBAR8_AND_OR(SHPAGECTRL, ~0xff, 0x40); - MCHBAR8_AND_OR(SHPAGECTRL + 1, ~0x07, 0x05); - MCHBAR8_OR(SHCMPLWRCMD, 0x1f); + mchbar8_and_or(SHPAGECTRL, (u8)~0xff, 0x40); + mchbar8_and_or(SHPAGECTRL + 1, (u8)~0x07, 0x05); + mchbar8_or(SHCMPLWRCMD, 0x1f); reg8 = (3 << 6); reg8 |= (s->dt0mode << 4); reg8 |= 0x0c; - MCHBAR8_AND_OR(SHBONUSREG, ~0xdf, reg8); - MCHBAR8_AND(CSHRWRIOMLNS, ~0x02); - MCHBAR8_AND_OR(C0MISCTM, ~0x07, 0x02); - MCHBAR16_AND_OR(C0BYPCTRL, ~0x3fc, 4 << 2); + mchbar8_and_or(SHBONUSREG, (u8)~0xdf, reg8); + mchbar8_and(CSHRWRIOMLNS, (u8)~0x02); + mchbar8_and_or(C0MISCTM, (u8)~0x07, 0x02); + mchbar16_and_or(C0BYPCTRL, (u16)~0x3fc, 4 << 2); /* [31..29] = 0b010 for kN = 2 (2N) */ reg32 = (2 << 29) | (1 << 28) | (1 << 23); - MCHBAR32_AND_OR(WRWMCONFIG, ~0xffb00000, reg32); + mchbar32_and_or(WRWMCONFIG, (u32)~0xffb00000, reg32); reg8 = (u8) ((MCHBAR16(C0CYCTRKACT) & 0xe000) >> 13); reg8 |= (u8) ((MCHBAR16(C0CYCTRKACT + 2) & 1) << 3); - MCHBAR8_AND_OR(BYPACTSF, ~0xf0, reg8 << 4); + mchbar8_and_or(BYPACTSF, (u8)~0xf0, reg8 << 4); reg8 = (u8) ((MCHBAR32(C0CYCTRKRD) & 0x000f0000) >> 17); - MCHBAR8_AND_OR(BYPACTSF, ~0x0f, reg8); + mchbar8_and_or(BYPACTSF, (u8)~0x0f, reg8); /* FIXME: Why not clear everything at once? */ - MCHBAR8_AND(BYPKNRULE, ~0xfc); - MCHBAR8_AND(BYPKNRULE, ~0x03); - MCHBAR8_AND(SHBONUSREG, ~0x03); - MCHBAR8_OR(C0BYPCTRL, 1); - MCHBAR16_OR(CSHRMISCCTL1, 1 << 9); + mchbar8_and(BYPKNRULE, (u8)~0xfc); + mchbar8_and(BYPKNRULE, (u8)~0x03); + mchbar8_and(SHBONUSREG, (u8)~0x03); + mchbar8_or(C0BYPCTRL, 1); + mchbar16_or(CSHRMISCCTL1, 1 << 9); for (i = 0; i < 8; i++) { /* FIXME: Hardcoded for DDR2 SO-DIMMs */ - MCHBAR32_AND_OR(C0DLLRCVCTLy(i), ~0x3f3f3f3f, 0x0c0c0c0c); + mchbar32_and_or(C0DLLRCVCTLy(i), (u32)~0x3f3f3f3f, 0x0c0c0c0c); } /* RDCS to RCVEN delay: Program coarse common to all bytelanes to default tCL + 1 */ - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x000f0000, (s->selected_timings.CAS + 1) << 16); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x000f0000, (s->selected_timings.CAS + 1) << 16); /* Program RCVEN delay with DLL-safe settings */ for (i = 0; i < 8; i++) { - MCHBAR8_AND(C0RXRCVyDLL(i), ~0x3f); - MCHBAR16_AND(C0RCVMISCCTL2, (u16) ~(3 << (i * 2))); - MCHBAR16_AND(C0RCVMISCCTL1, (u16) ~(3 << (i * 2))); - MCHBAR16_AND(C0COARSEDLY0, (u16) ~(3 << (i * 2))); + mchbar8_and(C0RXRCVyDLL(i), (u8)~0x3f); + mchbar16_and(C0RCVMISCCTL2, (u16)~(3 << (i * 2))); + mchbar16_and(C0RCVMISCCTL1, (u16)~(3 << (i * 2))); + mchbar16_and(C0COARSEDLY0, (u16)~(3 << (i * 2))); } - MCHBAR8_AND(C0DLLPIEN, ~1); /* Power up receiver */ - MCHBAR8_OR(C0DLLPIEN, 2); /* Enable RCVEN DLL */ - MCHBAR8_OR(C0DLLPIEN, 4); /* Enable receiver DQS DLL */ - MCHBAR32_OR(C0COREBONUS, 0x000c0400); - MCHBAR32_OR(C0CMDTX1, 1 << 31); + mchbar8_and(C0DLLPIEN, (u8)~1); /* Power up receiver */ + mchbar8_or(C0DLLPIEN, 2); /* Enable RCVEN DLL */ + mchbar8_or(C0DLLPIEN, 4); /* Enable receiver DQS DLL */ + mchbar32_or(C0COREBONUS, 0x000c0400); + mchbar32_or(C0CMDTX1, 1 << 31); } /* Program clkset0's register for Kcoarse, Tap, PI, DBEn and DBSel */ static void sdram_p_clkset0(const struct pllparam *pll, u8 f, u8 i) { - MCHBAR16_AND_OR(C0CKTX, ~0xc440, + mchbar16_and_or(C0CKTX, (u16)~0xc440, (pll->clkdelay[f][i] << 14) | (pll->dben[f][i] << 10) | (pll->dbsel[f][i] << 6)); - MCHBAR8_AND_OR(C0TXCK0DLL, ~0x3f, pll->pi[f][i]); + mchbar8_and_or(C0TXCK0DLL, (u8)~0x3f, pll->pi[f][i]); } /* Program clkset1's register for Kcoarse, Tap, PI, DBEn and DBSel */ static void sdram_p_clkset1(const struct pllparam *pll, u8 f, u8 i) { /* FIXME: This is actually a dword write! */ - MCHBAR16_AND_OR(C0CKTX, ~0x00030880, + mchbar16_and_or(C0CKTX, (u16)~0x00030880, (pll->clkdelay[f][i] << 16) | (pll->dben[f][i] << 11) | (pll->dbsel[f][i] << 7)); - MCHBAR8_AND_OR(C0TXCK1DLL, ~0x3f, pll->pi[f][i]); + mchbar8_and_or(C0TXCK1DLL, (u8)~0x3f, pll->pi[f][i]); } /* Program CMD0 and CMD1 registers for Kcoarse, Tap, PI, DBEn and DBSel */ @@ -872,14 +873,14 @@ /* Clock Group Index 3 */ reg8 = pll->dbsel[f][i] << 5; reg8 |= pll->dben[f][i] << 6; - MCHBAR8_AND_OR(C0CMDTX1, ~0x60, reg8); + mchbar8_and_or(C0CMDTX1, (u8)~0x60, reg8); reg8 = pll->clkdelay[f][i] << 4; - MCHBAR8_AND_OR(C0CMDTX2, ~0x30, reg8); + mchbar8_and_or(C0CMDTX2, (u8)~0x30, reg8); reg8 = pll->pi[f][i]; - MCHBAR8_AND_OR(C0TXCMD0DLL, ~0x3f, reg8); - MCHBAR8_AND_OR(C0TXCMD1DLL, ~0x3f, reg8); + mchbar8_and_or(C0TXCMD0DLL, (u8)~0x3f, reg8); + mchbar8_and_or(C0TXCMD1DLL, (u8)~0x3f, reg8); } /* Program CTRL registers for Kcoarse, Tap, PI, DBEn and DBSel */ @@ -895,11 +896,11 @@ reg32 |= ((u32) pll->dben[f][i]) << 23; reg32 |= ((u32) pll->clkdelay[f][i]) << 24; reg32 |= ((u32) pll->clkdelay[f][i]) << 27; - MCHBAR32_AND_OR(C0CTLTX2, ~0x01bf0000, reg32); + mchbar32_and_or(C0CTLTX2, (u32)~0x01bf0000, reg32); reg8 = pll->pi[f][i]; - MCHBAR8_AND_OR(C0TXCTL0DLL, ~0x3f, reg8); - MCHBAR8_AND_OR(C0TXCTL1DLL, ~0x3f, reg8); + mchbar8_and_or(C0TXCTL0DLL, (u8)~0x3f, reg8); + mchbar8_and_or(C0TXCTL1DLL, (u8)~0x3f, reg8); /* CTRL2 and CTRL3 */ reg32 = ((u32) pll->dbsel[f][i]) << 12; @@ -908,11 +909,11 @@ reg32 |= ((u32) pll->dben[f][i]) << 9; reg32 |= ((u32) pll->clkdelay[f][i]) << 14; reg32 |= ((u32) pll->clkdelay[f][i]) << 10; - MCHBAR32_AND_OR(C0CMDTX2, ~0xff00, reg32); + mchbar32_and_or(C0CMDTX2, (u32)~0xff00, reg32); reg8 = pll->pi[f][i]; - MCHBAR8_AND_OR(C0TXCTL2DLL, ~0x3f, reg8); - MCHBAR8_AND_OR(C0TXCTL3DLL, ~0x3f, reg8); + mchbar8_and_or(C0TXCTL2DLL, (u8)~0x3f, reg8); + mchbar8_and_or(C0TXCTL3DLL, (u8)~0x3f, reg8); } static void sdram_p_dqs(struct pllparam *pll, u8 f, u8 clk) @@ -934,11 +935,11 @@ & ~((1 << (dqs + 9)) | (1 << dqs))) | reg32; reg32 = ((u32) pll->clkdelay[f][clk]) << ((dqs * 2) + 16); - MCHBAR32_AND_OR(C0DQSDQRyTX3(rank), ~((1 << (dqs * 2 + 17)) | (1 << (dqs * 2 + 16))), + mchbar32_and_or(C0DQSDQRyTX3(rank), ~((1 << (dqs * 2 + 17)) | (1 << (dqs * 2 + 16))), reg32); reg8 = pll->pi[f][clk]; - MCHBAR8_AND_OR(C0TXDQS0R0DLL + j, ~0x3f, reg8); + mchbar8_and_or(C0TXDQS0R0DLL + j, (u8)~0x3f, reg8); } @@ -961,10 +962,10 @@ & ~((1 << (dq + 9)) | (1 << dq))) | reg32; reg32 = ((u32) pll->clkdelay[f][clk]) << (dq*2); - MCHBAR32_AND_OR(C0DQSDQRyTX3(rank), ~((1 << (dq * 2 + 1)) | (1 << (dq * 2))), reg32); + mchbar32_and_or(C0DQSDQRyTX3(rank), ~((1 << (dq * 2 + 1)) | (1 << (dq * 2))), reg32); reg8 = pll->pi[f][clk]; - MCHBAR8_AND_OR(C0TXDQ0R0DLL + j, ~0x3f, reg8); + mchbar8_and_or(C0TXDQ0R0DLL + j, (u8)~0x3f, reg8); } /* WDLL programming: Perform HPLL/MPLL calibration after write levelization */ @@ -1055,8 +1056,8 @@ } /* Disable Dynamic DQS Slave Setting Per Rank */ - MCHBAR8_AND(CSHRDQSCMN, ~(1 << 7)); - MCHBAR16_AND_OR(CSHRPDCTL4, ~0x3fff, 0x1fff); + mchbar8_and(CSHRDQSCMN, (u8)~(1 << 7)); + mchbar16_and_or(CSHRPDCTL4, (u16)~0x3fff, 0x1fff); sdram_p_clkset0(&pll, f, 0); sdram_p_clkset1(&pll, f, 1); @@ -1079,13 +1080,13 @@ s->async = 0; reg8 = 0; - MCHBAR16_OR(CSHRPDCTL, 1 << 15); - MCHBAR8_AND(CSHRPDCTL, ~(1 << 7)); - MCHBAR8_OR(CSHRPDCTL, 1 << 3); - MCHBAR8_OR(CSHRPDCTL, 1 << 2); + mchbar16_or(CSHRPDCTL, 1 << 15); + mchbar8_and(CSHRPDCTL, (u8)~(1 << 7)); + mchbar8_or(CSHRPDCTL, 1 << 3); + mchbar8_or(CSHRPDCTL, 1 << 2); /* Start hardware HMC calibration */ - MCHBAR8_OR(CSHRPDCTL, 1 << 7); + mchbar8_or(CSHRPDCTL, 1 << 7); /* Busy-wait until calibration is done */ while ((MCHBAR8(CSHRPDCTL) & (1 << 2)) == 0) @@ -1110,80 +1111,80 @@ } else { reg32 = 0x00014221; } - MCHBAR32_AND_OR(CSHRMSTRCTL1, ~0x0fffffff, reg32); - MCHBAR32_OR(CSHRMSTRCTL1, 1 << 23); - MCHBAR32_OR(CSHRMSTRCTL1, 1 << 15); - MCHBAR32_AND(CSHRMSTRCTL1, ~(1 << 15)); + mchbar32_and_or(CSHRMSTRCTL1, (u32)~0x0fffffff, reg32); + mchbar32_or(CSHRMSTRCTL1, 1 << 23); + mchbar32_or(CSHRMSTRCTL1, 1 << 15); + mchbar32_and(CSHRMSTRCTL1, (u32)~(1 << 15)); if (s->nodll) { /* Disable the Master DLLs by setting these bits, IN ORDER! */ - MCHBAR16_OR(CSHRMSTRCTL0, 1 << 0); - MCHBAR16_OR(CSHRMSTRCTL0, 1 << 2); - MCHBAR16_OR(CSHRMSTRCTL0, 1 << 4); - MCHBAR16_OR(CSHRMSTRCTL0, 1 << 8); - MCHBAR16_OR(CSHRMSTRCTL0, 1 << 10); - MCHBAR16_OR(CSHRMSTRCTL0, 1 << 12); - MCHBAR16_OR(CSHRMSTRCTL0, 1 << 14); + mchbar16_or(CSHRMSTRCTL0, 1 << 0); + mchbar16_or(CSHRMSTRCTL0, 1 << 2); + mchbar16_or(CSHRMSTRCTL0, 1 << 4); + mchbar16_or(CSHRMSTRCTL0, 1 << 8); + mchbar16_or(CSHRMSTRCTL0, 1 << 10); + mchbar16_or(CSHRMSTRCTL0, 1 << 12); + mchbar16_or(CSHRMSTRCTL0, 1 << 14); } else { /* Enable the Master DLLs by clearing these bits, IN ORDER! */ - MCHBAR16_AND(CSHRMSTRCTL0, ~(1 << 0)); - MCHBAR16_AND(CSHRMSTRCTL0, ~(1 << 2)); - MCHBAR16_AND(CSHRMSTRCTL0, ~(1 << 4)); - MCHBAR16_AND(CSHRMSTRCTL0, ~(1 << 8)); - MCHBAR16_AND(CSHRMSTRCTL0, ~(1 << 10)); - MCHBAR16_AND(CSHRMSTRCTL0, ~(1 << 12)); - MCHBAR16_AND(CSHRMSTRCTL0, ~(1 << 14)); + mchbar16_and(CSHRMSTRCTL0, (u16)~(1 << 0)); + mchbar16_and(CSHRMSTRCTL0, (u16)~(1 << 2)); + mchbar16_and(CSHRMSTRCTL0, (u16)~(1 << 4)); + mchbar16_and(CSHRMSTRCTL0, (u16)~(1 << 8)); + mchbar16_and(CSHRMSTRCTL0, (u16)~(1 << 10)); + mchbar16_and(CSHRMSTRCTL0, (u16)~(1 << 12)); + mchbar16_and(CSHRMSTRCTL0, (u16)~(1 << 14)); } /* Initialize the Transmit DLL PI values in the following sequence. */ if (s->nodll) { - MCHBAR8_AND_OR(CREFPI, ~0x3f, 0x07); + mchbar8_and_or(CREFPI, (u8)~0x3f, 0x07); } else { - MCHBAR8_AND(CREFPI, ~0x3f); + mchbar8_and(CREFPI, (u8)~0x3f); } sdram_calibratepll(s, 0); // XXX check /* Enable all modular Slave DLL */ - MCHBAR16_OR(C0DLLPIEN, 1 << 11); - MCHBAR16_OR(C0DLLPIEN, 1 << 12); + mchbar16_or(C0DLLPIEN, 1 << 11); + mchbar16_or(C0DLLPIEN, 1 << 12); for (i = 0; i < 8; i++) { - MCHBAR16_OR(C0DLLPIEN, (1 << 10) >> i); + mchbar16_or(C0DLLPIEN, (1 << 10) >> i); } /* Enable DQ/DQS output */ - MCHBAR8_OR(C0SLVDLLOUTEN, 1); + mchbar8_or(C0SLVDLLOUTEN, 1); MCHBAR16(CSPDSLVWT) = 0x5005; - MCHBAR16_AND_OR(CSHRPDCTL2, ~0x1f1f, 0x051a); - MCHBAR16_AND_OR(CSHRPDCTL5, ~0xbf3f, 0x9010); + mchbar16_and_or(CSHRPDCTL2, (u16)~0x1f1f, 0x051a); + mchbar16_and_or(CSHRPDCTL5, (u16)~0xbf3f, 0x9010); if (s->nodll) { - MCHBAR8_AND_OR(CSHRPDCTL3, ~0x7f, 0x6b); + mchbar8_and_or(CSHRPDCTL3, (u8)~0x7f, 0x6b); } else { - MCHBAR8_AND_OR(CSHRPDCTL3, ~0x7f, 0x55); + mchbar8_and_or(CSHRPDCTL3, (u8)~0x7f, 0x55); sdram_calibratehwpll(s); } /* Disable Dynamic Diff Amp */ - MCHBAR32_AND(C0STATRDCTRL, ~(1 << 22)); + mchbar32_and(C0STATRDCTRL, (u32)~(1 << 22)); /* Now, start initializing the transmit FIFO */ - MCHBAR8_AND(C0MISCCTL, ~0x02); + mchbar8_and(C0MISCCTL, (u8)~0x02); /* Disable (gate) mdclk and mdclkb */ - MCHBAR8_OR(CSHWRIOBONUS, 0xc0); + mchbar8_or(CSHWRIOBONUS, 0xc0); /* Select mdmclk */ - MCHBAR8_AND(CSHWRIOBONUS, ~(1 << 5)); + mchbar8_and(CSHWRIOBONUS, (u8)~(1 << 5)); /* Ungate mdclk */ - MCHBAR8_AND_OR(CSHWRIOBONUS, ~0xc0, 1 << 6); - MCHBAR8_AND_OR(CSHRFIFOCTL, ~0x3f, 0x1a); + mchbar8_and_or(CSHWRIOBONUS, (u8)~0xc0, 1 << 6); + mchbar8_and_or(CSHRFIFOCTL, (u8)~0x3f, 0x1a); /* Enable the write pointer count */ - MCHBAR8_OR(CSHRFIFOCTL, 1); + mchbar8_or(CSHRFIFOCTL, 1); /* Set the DDR3 Reset Enable bit */ - MCHBAR8_OR(CSHRDDR3CTL, 1); + mchbar8_or(CSHRDDR3CTL, 1); /* Configure DQS-DQ Transmit */ MCHBAR32(CSHRDQSTXPGM) = 0x00551803; @@ -1191,10 +1192,10 @@ reg8 = 0; /* Switch all clocks on anyway */ /* Enable clock groups depending on rank population */ - MCHBAR32_AND_OR(C0CKTX, ~0x3f000000, reg8 << 24); + mchbar32_and_or(C0CKTX, (u32)~0x3f000000, reg8 << 24); /* Enable DDR command output buffers from core */ - MCHBAR8_AND(0x594, ~1); + mchbar8_and(0x594, (u8)~1); reg16 = 0; if (!rank_is_populated(s->dimms, 0, 0)) { @@ -1209,7 +1210,7 @@ if (!rank_is_populated(s->dimms, 0, 3)) { reg16 |= (1 << 11) | (1 << 7) | (1 << 3); } - MCHBAR16_OR(C0CTLTX2, reg16); + mchbar16_or(C0CTLTX2, reg16); } /* Define a shorter name for these to make the lines fit in 96 characters */ @@ -1344,54 +1345,54 @@ FOR_EACH_RCOMP_GROUP(i) { reg8 = rcompupdate[i]; - MCHBAR8_AND_OR(C0RCOMPCTRLx(i), ~1, reg8); - MCHBAR8_AND(C0RCOMPCTRLx(i), ~2); + mchbar8_and_or(C0RCOMPCTRLx(i), (u8)~1, reg8); + mchbar8_and(C0RCOMPCTRLx(i), (u8)~2); reg16 = rcompslew; - MCHBAR16_AND_OR(C0RCOMPCTRLx(i), ~0xf000, reg16 << 12); + mchbar16_and_or(C0RCOMPCTRLx(i), (u16)~0xf000, reg16 << 12); MCHBAR8(C0RCOMPMULTx(i)) = rcompstr[i]; MCHBAR16(C0SCOMPVREFx(i)) = rcompscomp[i]; - MCHBAR8_AND_OR(C0DCOMPx(i), ~0x03, rcompdelay[i]); + mchbar8_and_or(C0DCOMPx(i), (u8)~0x03, rcompdelay[i]); if (i == 2) { /* FIXME: Why are we rewriting this? */ - MCHBAR16_AND_OR(C0RCOMPCTRLx(i), ~0xf000, reg16 << 12); + mchbar16_and_or(C0RCOMPCTRLx(i), (u16)~0xf000, reg16 << 12); MCHBAR8(C0RCOMPMULTx(i)) = rcompstr2[s->dimm_config[0]]; MCHBAR16(C0SCOMPVREFx(i)) = rcompscomp2[s->dimm_config[0]]; - MCHBAR8_AND_OR(C0DCOMPx(i), ~0x03, rcompdelay2[s->dimm_config[0]]); + mchbar8_and_or(C0DCOMPx(i), (u8)~0x03, rcompdelay2[s->dimm_config[0]]); } - MCHBAR16_AND(C0SLEWBASEx(i), ~0x7f7f); + mchbar16_and(C0SLEWBASEx(i), (u16)~0x7f7f); /* FIXME: Why not do a single dword write? */ - MCHBAR16_AND(C0SLEWPULUTx(i), ~0x3f3f); - MCHBAR16_AND(C0SLEWPULUTx(i) + 2, ~0x3f3f); + mchbar16_and(C0SLEWPULUTx(i), (u16)~0x3f3f); + mchbar16_and(C0SLEWPULUTx(i) + 2, (u16)~0x3f3f); /* FIXME: Why not do a single dword write? */ - MCHBAR16_AND(C0SLEWPDLUTx(i), ~0x3f3f); - MCHBAR16_AND(C0SLEWPDLUTx(i) + 2, ~0x3f3f); + mchbar16_and(C0SLEWPDLUTx(i), (u16)~0x3f3f); + mchbar16_and(C0SLEWPDLUTx(i) + 2, (u16)~0x3f3f); } /* FIXME: Hardcoded */ - MCHBAR8_AND_OR(C0ODTRECORDX, ~0x3f, 0x36); - MCHBAR8_AND_OR(C0DQSODTRECORDX, ~0x3f, 0x36); + mchbar8_and_or(C0ODTRECORDX, (u8)~0x3f, 0x36); + mchbar8_and_or(C0DQSODTRECORDX, (u8)~0x3f, 0x36); FOR_EACH_RCOMP_GROUP(i) { - MCHBAR8_AND(C0RCOMPCTRLx(i), ~0x60); - MCHBAR16_AND(C0RCOMPCTRLx(i) + 2, ~0x0706); - MCHBAR16_AND(C0RCOMPOSVx(i), ~0x7f7f); - MCHBAR16_AND(C0SCOMPOFFx(i), ~0x3f3f); - MCHBAR16_AND(C0DCOMPOFFx(i), ~0x1f1f); - MCHBAR8_AND(C0DCOMPOFFx(i) + 2, ~0x1f); + mchbar8_and(C0RCOMPCTRLx(i), (u8)~0x60); + mchbar16_and(C0RCOMPCTRLx(i) + 2, (u16)~0x0706); + mchbar16_and(C0RCOMPOSVx(i), (u16)~0x7f7f); + mchbar16_and(C0SCOMPOFFx(i), (u16)~0x3f3f); + mchbar16_and(C0DCOMPOFFx(i), (u16)~0x1f1f); + mchbar8_and(C0DCOMPOFFx(i) + 2, (u8)~0x1f); } - MCHBAR16_AND(C0ODTRECORDX, ~0xffc0); - MCHBAR16_AND(C0ODTRECORDX + 2, ~0x000f); + mchbar16_and(C0ODTRECORDX, (u16)~0xffc0); + mchbar16_and(C0ODTRECORDX + 2, (u16)~0x000f); /* FIXME: Why not do a single dword write? */ - MCHBAR16_AND(C0DQSODTRECORDX, ~0xffc0); - MCHBAR16_AND(C0DQSODTRECORDX + 2, ~0x000f); + mchbar16_and(C0DQSODTRECORDX, (u16)~0xffc0); + mchbar16_and(C0DQSODTRECORDX + 2, (u16)~0x000f); FOR_EACH_RCOMP_GROUP(i) { MCHBAR16(C0SCOMPOVRx(i)) = rcompf[i]; @@ -1401,33 +1402,33 @@ MCHBAR16(C0DCOMPOVRx(i) + 2) = 0x000C; } - MCHBAR32_AND_OR(DCMEASBUFOVR, ~0x001f1f1f, 0x000c1219); + mchbar32_and_or(DCMEASBUFOVR, (u32)~0x001f1f1f, 0x000c1219); /* FIXME: Why not do a single word write? */ - MCHBAR16_AND_OR(XCOMPSDR0BNS, ~0x1f00, 0x1200); - MCHBAR8_AND_OR(XCOMPSDR0BNS, ~0x1f, 0x12); + mchbar16_and_or(XCOMPSDR0BNS, (u16)~0x1f00, 0x1200); + mchbar8_and_or(XCOMPSDR0BNS, (u8)~0x1f, 0x12); MCHBAR32(COMPCTRL3) = 0x007C9007; MCHBAR32(OFREQDELSEL) = rcomp1; MCHBAR16(XCOMPCMNBNS) = 0x1f7f; MCHBAR32(COMPCTRL2) = rcomp2; - MCHBAR16_AND_OR(XCOMPDFCTRL, ~0x0f, 1); + mchbar16_and_or(XCOMPDFCTRL, (u16)~0x0f, 1); MCHBAR16(ZQCALCTRL) = 0x0134; MCHBAR32(COMPCTRL1) = 0x4C293600; /* FIXME: wtf did these MRC guys smoke */ - MCHBAR8_AND_OR(COMPCTRL1 + 3, ~0x44, (1 << 6) | (1 << 2)); - MCHBAR16_AND(XCOMPSDR0BNS, ~(1 << 13)); - MCHBAR8_AND(XCOMPSDR0BNS, ~(1 << 5)); + mchbar8_and_or(COMPCTRL1 + 3, (u8)~0x44, (1 << 6) | (1 << 2)); + mchbar16_and(XCOMPSDR0BNS, (u16)~(1 << 13)); + mchbar8_and(XCOMPSDR0BNS, (u8)~(1 << 5)); FOR_EACH_RCOMP_GROUP(i) { /* FIXME: This should be an _AND_OR */ - MCHBAR8(C0RCOMPCTRLx(i) + 2) = MCHBAR8(C0RCOMPCTRLx(i)) & ~0x71; + MCHBAR8(C0RCOMPCTRLx(i) + 2) = MCHBAR8(C0RCOMPCTRLx(i)) & (u8)~0x71; } if ((MCHBAR32(COMPCTRL1) & (1 << 30)) == 0) { /* Start COMP */ - MCHBAR8_OR(COMPCTRL1, 1); + mchbar8_or(COMPCTRL1, 1); /* Wait until COMP is done */ while ((MCHBAR8(COMPCTRL1) & 1) != 0) @@ -1443,55 +1444,55 @@ /* FIXME: Why not do a single word write? */ reg16 = (u16)(rcompp - (1 << (srup + 1))) << 8; - MCHBAR16_AND_OR(C0SLEWBASEx(i), ~0x7f00, reg16); + mchbar16_and_or(C0SLEWBASEx(i), (u16)~0x7f00, reg16); reg16 = (u16)(rcompn - (1 << (srun + 1))); - MCHBAR8_AND_OR(C0SLEWBASEx(i), ~0x7f, (u8)reg16); + mchbar8_and_or(C0SLEWBASEx(i), (u8)~0x7f, (u8)reg16); } reg8 = rcompp - (1 << (srup + 1)); for (i = 0, j = reg8; i < 4; i++, j += (1 << srup)) { - MCHBAR8_AND_OR(C0SLEWPULUTx(0) + i, ~0x3f, rcomplut[j][0]); + mchbar8_and_or(C0SLEWPULUTx(0) + i, (u8)~0x3f, rcomplut[j][0]); } for (i = 0, j = reg8; i < 4; i++, j += (1 << srup)) { if (s->dimm_config[0] < 3 || s->dimm_config[0] == 5) { - MCHBAR8_AND_OR(C0SLEWPULUTx(2) + i, ~0x3f, rcomplut[j][10]); + mchbar8_and_or(C0SLEWPULUTx(2) + i, (u8)~0x3f, rcomplut[j][10]); } } for (i = 0, j = reg8; i < 4; i++, j += (1 << srup)) { - MCHBAR8_AND_OR(C0SLEWPULUTx(3) + i, ~0x3f, rcomplut[j][6]); - MCHBAR8_AND_OR(C0SLEWPULUTx(4) + i, ~0x3f, rcomplut[j][6]); + mchbar8_and_or(C0SLEWPULUTx(3) + i, (u8)~0x3f, rcomplut[j][6]); + mchbar8_and_or(C0SLEWPULUTx(4) + i, (u8)~0x3f, rcomplut[j][6]); } for (i = 0, j = reg8; i < 4; i++, j += (1 << srup)) { - MCHBAR8_AND_OR(C0SLEWPULUTx(5) + i, ~0x3f, rcomplut[j][8]); - MCHBAR8_AND_OR(C0SLEWPULUTx(6) + i, ~0x3f, rcomplut[j][8]); + mchbar8_and_or(C0SLEWPULUTx(5) + i, (u8)~0x3f, rcomplut[j][8]); + mchbar8_and_or(C0SLEWPULUTx(6) + i, (u8)~0x3f, rcomplut[j][8]); } reg8 = rcompn - (1 << (srun + 1)); for (i = 0, j = reg8; i < 4; i++, j += (1 << srun)) { - MCHBAR8_AND_OR(C0SLEWPDLUTx(0) + i, ~0x3f, rcomplut[j][1]); + mchbar8_and_or(C0SLEWPDLUTx(0) + i, (u8)~0x3f, rcomplut[j][1]); } for (i = 0, j = reg8; i < 4; i++, j += (1 << srun)) { if (s->dimm_config[0] < 3 || s->dimm_config[0] == 5) { - MCHBAR8_AND_OR(C0SLEWPDLUTx(2) + i, ~0x3f, rcomplut[j][11]); + mchbar8_and_or(C0SLEWPDLUTx(2) + i, (u8)~0x3f, rcomplut[j][11]); } } for (i = 0, j = reg8; i < 4; i++, j += (1 << srun)) { - MCHBAR8_AND_OR(C0SLEWPDLUTx(3) + i, ~0x3f, rcomplut[j][7]); - MCHBAR8_AND_OR(C0SLEWPDLUTx(4) + i, ~0x3f, rcomplut[j][7]); + mchbar8_and_or(C0SLEWPDLUTx(3) + i, (u8)~0x3f, rcomplut[j][7]); + mchbar8_and_or(C0SLEWPDLUTx(4) + i, (u8)~0x3f, rcomplut[j][7]); } for (i = 0, j = reg8; i < 4; i++, j += (1 << srun)) { - MCHBAR8_AND_OR(C0SLEWPDLUTx(5) + i, ~0x3f, rcomplut[j][9]); - MCHBAR8_AND_OR(C0SLEWPDLUTx(6) + i, ~0x3f, rcomplut[j][9]); + mchbar8_and_or(C0SLEWPDLUTx(5) + i, (u8)~0x3f, rcomplut[j][9]); + mchbar8_and_or(C0SLEWPDLUTx(6) + i, (u8)~0x3f, rcomplut[j][9]); } } - MCHBAR8_OR(COMPCTRL1, 1); + mchbar8_or(COMPCTRL1, 1); } /* FIXME: The ODT tables are for DDR2 only! */ @@ -1566,24 +1567,24 @@ if ((s->dimm_config[0] < 3) && rank_is_populated(s->dimms, 0, 0)) { if (s->dimms[0].sides > 1) { // 2R/NC - MCHBAR32_AND_OR(C0CKECTRL, ~1, 0x300001); + mchbar32_and_or(C0CKECTRL, (u32)~1, 0x300001); MCHBAR32(C0DRA01) = 0x00000101; MCHBAR32(C0DRB0) = 0x00040002; MCHBAR32(C0DRB2) = w204[s->dimm_config[0]]; } else { // 1R/NC - MCHBAR32_AND_OR(C0CKECTRL, ~1, 0x100001); + mchbar32_and_or(C0CKECTRL, (u32)~1, 0x100001); MCHBAR32(C0DRA01) = 0x00000001; MCHBAR32(C0DRB0) = 0x00020002; MCHBAR32(C0DRB2) = w204[s->dimm_config[0]]; } } else if ((s->dimm_config[0] == 5) && rank_is_populated(s->dimms, 0, 0)) { - MCHBAR32_AND_OR(C0CKECTRL, ~1, 0x300001); + mchbar32_and_or(C0CKECTRL, (u32)~1, 0x300001); MCHBAR32(C0DRA01) = 0x00000101; MCHBAR32(C0DRB0) = 0x00040002; MCHBAR32(C0DRB2) = 0x00040004; } else { - MCHBAR32_AND_OR(C0CKECTRL, ~1, w260[s->dimm_config[0]]); + mchbar32_and_or(C0CKECTRL, (u32)~1, w260[s->dimm_config[0]]); MCHBAR32(C0DRA01) = w208[s->dimm_config[0]]; MCHBAR32(C0DRB0) = w200[s->dimm_config[0]]; MCHBAR32(C0DRB2) = w204[s->dimm_config[0]]; @@ -1652,10 +1653,10 @@ u32 reg32a, reg32b; ok = 0; - MCHBAR8_AND(XCOMPDFCTRL, ~(1 << 3)); - MCHBAR8_AND(COMPCTRL1, ~(1 << 7)); + mchbar8_and(XCOMPDFCTRL, (u8)~(1 << 3)); + mchbar8_and(COMPCTRL1, (u8)~(1 << 7)); for (i = 0; i < 3; i++) { - MCHBAR8_OR(COMPCTRL1, 1); + mchbar8_or(COMPCTRL1, 1); hpet_udelay(1000); while ((MCHBAR8(COMPCTRL1) & 1) != 0) ; @@ -1668,7 +1669,7 @@ reg32a |= (1 << 31) | (1 << 15); MCHBAR32(RCMEASBUFXOVR) = reg32a; } - MCHBAR8_OR(COMPCTRL1, 1); + mchbar8_or(COMPCTRL1, 1); hpet_udelay(1000); while ((MCHBAR8(COMPCTRL1) & 1) != 0) ; @@ -1681,7 +1682,7 @@ reg32 = jval << 3; reg32 |= rank * (1 << 27); - MCHBAR8_AND_OR(C0JEDEC, ~0x3e, jmode); + mchbar8_and_or(C0JEDEC, (u8)~0x3e, jmode); read32((void *)reg32); barrier(); hpet_udelay(1); // 1us @@ -1690,10 +1691,10 @@ static void sdram_zqcl(struct sysinfo *s) { if (s->boot_path == BOOT_PATH_RESUME) { - MCHBAR32_OR(C0CKECTRL, 1 << 27); - MCHBAR8_AND_OR(C0JEDEC, ~0x0e, NORMAL_OP_CMD); - MCHBAR8_AND(C0JEDEC, ~0x30); - MCHBAR32_AND_OR(C0REFRCTRL2, ~(3 << 30), 3 << 30); + mchbar32_or(C0CKECTRL, 1 << 27); + mchbar8_and_or(C0JEDEC, (u8)~0x0e, NORMAL_OP_CMD); + mchbar8_and(C0JEDEC, (u8)~0x30); + mchbar32_and_or(C0REFRCTRL2, (u32)~(3 << 30), 3 << 30); } } @@ -1759,12 +1760,12 @@ reg32 = 0; reg32 |= (4 << 13); reg32 |= (6 << 8); - MCHBAR32_AND_OR(C0DYNRDCTRL, ~0x3ff00, reg32); - MCHBAR8_AND(C0DYNRDCTRL, ~(1 << 7)); - MCHBAR8_OR(C0REFRCTRL + 3, 1); + mchbar32_and_or(C0DYNRDCTRL, (u32)~0x3ff00, reg32); + mchbar8_and(C0DYNRDCTRL, (u8)~(1 << 7)); + mchbar8_or(C0REFRCTRL + 3, 1); if (s->boot_path != BOOT_PATH_RESUME) { - MCHBAR8_AND_OR(C0JEDEC, ~0x0e, NORMAL_OP_CMD); - MCHBAR8_AND(C0JEDEC, ~0x30); + mchbar8_and_or(C0JEDEC, (u8)~0x0e, NORMAL_OP_CMD); + mchbar8_and(C0JEDEC, (u8)~0x30); } else { sdram_zqcl(s); } @@ -1861,10 +1862,10 @@ reg32 |= (1 << r); } reg8 = (u8)(reg32 << 4) & 0xf0; - MCHBAR8_AND_OR(C0CKECTRL + 2, ~0xf0, reg8); + mchbar8_and_or(C0CKECTRL + 2, (u8)~0xf0, reg8); if (ONLY_DIMMA_IS_POPULATED(s->dimms, 0) || ONLY_DIMMB_IS_POPULATED(s->dimms, 0)) { - MCHBAR8_OR(C0CKECTRL, 1); + mchbar8_or(C0CKECTRL, 1); } addr = C0DRB0; @@ -1885,9 +1886,9 @@ { u8 dqsmatches = 1; while (count--) { - MCHBAR8_AND(C0RSTCTL, ~2); + mchbar8_and(C0RSTCTL, (u8)~2); hpet_udelay(1); - MCHBAR8_OR(C0RSTCTL, 2); + mchbar8_or(C0RSTCTL, 2); hpet_udelay(1); barrier(); read32((void *)strobeaddr); @@ -1906,12 +1907,12 @@ { if (*medium < 3) { (*medium)++; - MCHBAR16_AND_OR(C0RCVMISCCTL2, (u16)~(3 << (lane * 2)), *medium << (lane * 2)); + mchbar16_and_or(C0RCVMISCCTL2, (u16)~(3 << (lane * 2)), *medium << (lane * 2)); } else { *medium = 0; (*coarse)++; - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x000f0000, *coarse << 16); - MCHBAR16_AND_OR(C0RCVMISCCTL2, (u16)(~3 << (lane * 2)), *medium << (lane * 2)); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x000f0000, *coarse << 16); + mchbar16_and_or(C0RCVMISCCTL2, (u16)(~3 << (lane * 2)), *medium << (lane * 2)); } } @@ -1930,8 +1931,8 @@ u32 strobeaddr = 0; u32 dqshighaddr; - MCHBAR8_AND(C0RSTCTL, ~0x0c); - MCHBAR8_AND(CMNDQFIFORST, ~0x80); + mchbar8_and(C0RSTCTL, (u8)~0x0c); + mchbar8_and(CMNDQFIFORST, (u8)~0x80); PRINTK_DEBUG("rcven 0\n"); for (lane = 0; lane < maxlane; lane++) { @@ -1943,10 +1944,10 @@ pi = 0; medium = 0; - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x000f0000, coarse << 16); - MCHBAR16_AND_OR(C0RCVMISCCTL2, (u16)~(3 << (lane * 2)), medium << (lane * 2)); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x000f0000, coarse << 16); + mchbar16_and_or(C0RCVMISCCTL2, (u16)~(3 << (lane * 2)), medium << (lane * 2)); - MCHBAR8_AND(C0RXRCVyDLL(lane), ~0x3f); + mchbar8_and(C0RXRCVyDLL(lane), (u8)~0x3f); savecoarse = coarse; savemedium = medium; @@ -1955,7 +1956,7 @@ PRINTK_DEBUG("rcven 0.1\n"); // XXX comment out - // MCHBAR16_AND_OR(C0RCVMISCCTL1, (u16)~3 << (lane * 2), 1 << (lane * 2)); + // mchbar16_and_or(C0RCVMISCCTL1, (u16)~3 << (lane * 2), 1 << (lane * 2)); while (sampledqs(dqshighaddr, strobeaddr, 0, 3) == 0) { // printk(BIOS_DEBUG, "coarse=%d medium=%d\n", coarse, medium); @@ -1986,8 +1987,8 @@ PRINTK_DEBUG("rcven 0.3\n"); coarse = savecoarse; medium = savemedium; - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x000f0000, coarse << 16); - MCHBAR16_AND_OR(C0RCVMISCCTL2, (u16)~(0x3 << lane * 2), medium << (lane * 2)); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x000f0000, coarse << 16); + mchbar16_and_or(C0RCVMISCCTL2, (u16)~(0x3 << lane * 2), medium << (lane * 2)); while (sampledqs(dqshighaddr, strobeaddr, 1, 3) == 0) { savepi = pi; @@ -1998,12 +1999,12 @@ break; // } } - MCHBAR8_AND_OR(C0RXRCVyDLL(lane), ~0x3f, pi << s->pioffset); + mchbar8_and_or(C0RXRCVyDLL(lane), (u8)~0x3f, pi << s->pioffset); } PRINTK_DEBUG("rcven 0.4\n"); pi = savepi; - MCHBAR8_AND_OR(C0RXRCVyDLL(lane), ~0x3f, pi << s->pioffset); + mchbar8_and_or(C0RXRCVyDLL(lane), (u8)~0x3f, pi << s->pioffset); rcvenclock(&coarse, &medium, lane); if (sampledqs(dqshighaddr, strobeaddr, 1, 1) == 0) { @@ -2013,7 +2014,7 @@ PRINTK_DEBUG("rcven 0.5\n"); while (sampledqs(dqshighaddr, strobeaddr, 0, 3) == 0) { coarse--; - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x000f0000, coarse << 16); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x000f0000, coarse << 16); if (coarse == 0) { PRINTK_DEBUG("Error: DQS did not hit 0\n"); break; @@ -2040,10 +2041,10 @@ do { lane--; offset = lanecoarse[lane] - minlanecoarse; - MCHBAR16_AND_OR(C0COARSEDLY0, (u16)(~(3 << (lane * 2))), offset << (lane * 2)); + mchbar16_and_or(C0COARSEDLY0, (u16)(~(3 << (lane * 2))), offset << (lane * 2)); } while (lane != 0); - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x000f0000, minlanecoarse << 16); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x000f0000, minlanecoarse << 16); s->coarsectrl = minlanecoarse; s->coarsedelay = MCHBAR16(C0COARSEDLY0); @@ -2051,14 +2052,14 @@ s->readptrdelay = MCHBAR16(C0RCVMISCCTL1); PRINTK_DEBUG("rcven 2\n"); - MCHBAR8_AND(C0RSTCTL, ~0x0e); - MCHBAR8_OR(C0RSTCTL, 0x02); - MCHBAR8_OR(C0RSTCTL, 0x04); - MCHBAR8_OR(C0RSTCTL, 0x08); + mchbar8_and(C0RSTCTL, (u8)~0x0e); + mchbar8_or(C0RSTCTL, 0x02); + mchbar8_or(C0RSTCTL, 0x04); + mchbar8_or(C0RSTCTL, 0x08); - MCHBAR8_OR(CMNDQFIFORST, 0x80); - MCHBAR8_AND(CMNDQFIFORST, ~0x80); - MCHBAR8_OR(CMNDQFIFORST, 0x80); + mchbar8_or(CMNDQFIFORST, 0x80); + mchbar8_and(CMNDQFIFORST, (u8)~0x80); + mchbar8_or(CMNDQFIFORST, 0x80); PRINTK_DEBUG("rcven 3\n"); } @@ -2138,20 +2139,20 @@ { u8 reg8, ch, r, fsb_freq, ddr_freq; u32 mask32, reg32; - MCHBAR8_OR(C0ADDCSCTRL, 1); - MCHBAR8_OR(C0REFRCTRL + 3, 1); + mchbar8_or(C0ADDCSCTRL, 1); + mchbar8_or(C0REFRCTRL + 3, 1); mask32 = (0x1f << 15) | (0x1f << 10) | (0x1f << 5) | 0x1f; reg32 = (0x1e << 15) | (0x10 << 10) | (0x1e << 5) | 0x10; - MCHBAR32_AND_OR(WRWMCONFIG, ~mask32, reg32); + mchbar32_and_or(WRWMCONFIG, (u32)~mask32, reg32); MCHBAR8(C0DITCTRL + 1) = 2; MCHBAR16(C0DITCTRL + 2) = 0x0804; MCHBAR16(C0DITCTRL + 4) = 0x2010; MCHBAR8(C0DITCTRL + 6) = 0x40; MCHBAR16(C0DITCTRL + 8) = 0x091c; MCHBAR8(C0DITCTRL + 10) = 0xf2; - MCHBAR8_OR(C0BYPCTRL, 1); - MCHBAR8_OR(C0CWBCTRL, 1); - MCHBAR16_OR(C0ARBSPL, 0x0100); + mchbar8_or(C0BYPCTRL, 1); + mchbar8_or(C0CWBCTRL, 1); + mchbar16_or(C0ARBSPL, 0x0100); pci_or_config8(HOST_BRIDGE, 0xf0, 1); MCHBAR32(SBCTL) = 0x00000002; @@ -2162,7 +2163,7 @@ MCHBAR32(HIT2) = 0x07000000; MCHBAR32(HIT3) = 0x01014010; MCHBAR32(HIT4) = 0x0f038000; - pci_and_config8(HOST_BRIDGE, 0xf0, ~1); + pci_and_config8(HOST_BRIDGE, 0xf0, (u8)~1); u32 nranks, curranksize, maxranksize, dra; u8 rankmismatch; @@ -2209,14 +2210,14 @@ die("Invalid number of ranks found, halt\n"); break; } - MCHBAR8_AND_OR(CHDECMISC, ~0xfc, reg8 & 0xfc); - MCHBAR32_AND(NOACFGBUSCTL, ~0x80000000); + mchbar8_and_or(CHDECMISC, (u8)~0xfc, reg8 & 0xfc); + mchbar32_and(NOACFGBUSCTL, (u32)~0x80000000); MCHBAR32(HTBONUS0) = 0x0000000f; - MCHBAR8_OR(C0COREBONUS + 4, 1); + mchbar8_or(C0COREBONUS + 4, 1); - MCHBAR32_AND(HIT3, ~0x0e000000); - MCHBAR32_AND_OR(HIT4, ~0x000c0000, 0x00040000); + mchbar32_and(HIT3, (u32)~0x0e000000); + mchbar32_and_or(HIT4, (u32)~0x000c0000, 0x00040000); u32 clkcx[2][2][3] = { { @@ -2236,20 +2237,20 @@ MCHBAR32(CLKXSSH2X2MD + 4) = clkcx[fsb_freq][ddr_freq][1]; MCHBAR32(CLKXSSH2MCBYP + 4) = clkcx[fsb_freq][ddr_freq][2]; - MCHBAR8_AND(HIT4, ~0x02); + mchbar8_and(HIT4, (u8)~0x02); } static void sdram_periodic_rcomp(void) { - MCHBAR8_AND(COMPCTRL1, ~0x02); + mchbar8_and(COMPCTRL1, (u8)~0x02); while ((MCHBAR32(COMPCTRL1) & 0x80000000) > 0) { ; } - MCHBAR16_AND(CSHRMISCCTL, ~0x3000); - MCHBAR8_OR(CMNDQFIFORST, 0x80); - MCHBAR16_AND_OR(XCOMPDFCTRL, ~0x0f, 0x09); + mchbar16_and(CSHRMISCCTL, (u16)~0x3000); + mchbar8_or(CMNDQFIFORST, 0x80); + mchbar16_and_or(XCOMPDFCTRL, (u16)~0x0f, 0x09); - MCHBAR8_OR(COMPCTRL1, 0x82); + mchbar8_or(COMPCTRL1, 0x82); } static void sdram_new_trd(struct sysinfo *s) @@ -2337,7 +2338,7 @@ } } - MCHBAR16_AND_OR(C0STATRDCTRL, ~0x1f00, trd << 8); + mchbar16_and_or(C0STATRDCTRL, (u16)~0x1f00, trd << 8); } static void sdram_powersettings(struct sysinfo *s) @@ -2347,26 +2348,26 @@ /* Thermal sensor */ MCHBAR8(TSC1) = 0x9b; - MCHBAR32_AND_OR(TSTTP, ~0x00ffffff, 0x1d00); + mchbar32_and_or(TSTTP, (u32)~0x00ffffff, 0x1d00); MCHBAR8(THERM1) = 0x08; MCHBAR8(TSC3) = 0x00; - MCHBAR8_AND_OR(TSC2, ~0x0f, 0x04); - MCHBAR8_AND_OR(THERM1, ~1, 1); - MCHBAR8_AND_OR(TCO, ~0x80, 0x80); + mchbar8_and_or(TSC2, (u8)~0x0f, 0x04); + mchbar8_and_or(THERM1, (u8)~1, 1); + mchbar8_and_or(TCO, (u8)~0x80, 0x80); /* Clock gating */ - MCHBAR32_AND(PMMISC, ~0x00040001); - MCHBAR8_AND(SBCTL3 + 3, ~0x80); - MCHBAR8_AND(CISDCTRL + 3, ~0x80); - MCHBAR16_AND(CICGDIS, ~0x1fff); - MCHBAR32_AND(SBCLKGATECTRL, ~0x0001ffff); - MCHBAR16_AND(HICLKGTCTL, ~0x03ff & 0x06); - MCHBAR32_AND_OR(HTCLKGTCTL, ~0xffffffff, 0x20); - MCHBAR8_AND(TSMISC, ~1); + mchbar32_and(PMMISC, (u32)~0x00040001); + mchbar8_and(SBCTL3 + 3, (u8)~0x80); + mchbar8_and(CISDCTRL + 3, (u8)~0x80); + mchbar16_and(CICGDIS, (u16)~0x1fff); + mchbar32_and(SBCLKGATECTRL, (u32)~0x0001ffff); + mchbar16_and(HICLKGTCTL, (u16)~0x03ff & 0x06); + mchbar32_and_or(HTCLKGTCTL, (u32)~0xffffffff, 0x20); + mchbar8_and(TSMISC, (u8)~1); MCHBAR8(C0WRDPYN) = s->selected_timings.CAS - 1 + 0x15; - MCHBAR16_AND_OR(CLOCKGATINGI, ~0x07fc, 0x0040); - MCHBAR16_AND_OR(CLOCKGATINGII, ~0x0fff, 0x0d00); - MCHBAR16_AND(CLOCKGATINGIII, ~0x0d80); + mchbar16_and_or(CLOCKGATINGI, (u16)~0x07fc, 0x0040); + mchbar16_and_or(CLOCKGATINGII, (u16)~0x0fff, 0x0d00); + mchbar16_and(CLOCKGATINGIII, (u16)~0x0d80); MCHBAR16(GTDPCGC + 2) = 0xffff; /* Sequencing */ @@ -2379,15 +2380,15 @@ MCHBAR32(PMDSLFRC) = (MCHBAR32(PMDSLFRC) & ~0x0001bff7) | 0x00000078; if (s->selected_timings.fsb_clock == FSB_CLOCK_667MHz) - MCHBAR16_AND_OR(PMMSPMRES, ~0x03ff, 0x00c8); + mchbar16_and_or(PMMSPMRES, (u16)~0x03ff, 0x00c8); else - MCHBAR16_AND_OR(PMMSPMRES, ~0x03ff, 0x0100); + mchbar16_and_or(PMMSPMRES, (u16)~0x03ff, 0x0100); j = (s->selected_timings.mem_clock == MEM_CLOCK_667MHz) ? 0 : 1; - MCHBAR32_AND_OR(PMCLKRC, ~0x01fff37f, 0x10810700); - MCHBAR8_AND_OR(PMPXPRC, ~0x07, 1); - MCHBAR8_AND(PMBAK, ~0x02); + mchbar32_and_or(PMCLKRC, (u32)~0x01fff37f, 0x10810700); + mchbar8_and_or(PMPXPRC, (u8)~0x07, 1); + mchbar8_and(PMBAK, (u8)~0x02); static const u16 ddr2lut[2][4][2] = { { @@ -2407,8 +2408,8 @@ MCHBAR16(C0C2REG) = 0x7a89; MCHBAR8(SHC2REGII) = 0xaa; MCHBAR16(SHC2REGII + 1) = ddr2lut[j][s->selected_timings.CAS - 3][1]; - MCHBAR16_AND_OR(SHC2REGI, ~0x7fff, ddr2lut[j][s->selected_timings.CAS - 3][0]); - MCHBAR16_AND_OR(CLOCKGATINGIII, ~0xf000, 0xf000); + mchbar16_and_or(SHC2REGI, (u16)~0x7fff, ddr2lut[j][s->selected_timings.CAS - 3][0]); + mchbar16_and_or(CLOCKGATINGIII, (u16)~0xf000, 0xf000); MCHBAR8(CSHWRIOBONUSX) = (MCHBAR8(CSHWRIOBONUSX) & ~0x77) | (4 << 4 | 4); reg32 = s->nodll ? 0x30000000 : 0; @@ -2416,72 +2417,72 @@ /* FIXME: Compacting this results in changes to the binary */ MCHBAR32(C0COREBONUS) = (MCHBAR32(C0COREBONUS) & ~0x0f000000) | 0x20000000 | reg32; - MCHBAR32_AND_OR(CLOCKGATINGI, ~0x00f00000, 0x00f00000); - MCHBAR32_AND_OR(CLOCKGATINGII - 1, ~0x001ff000, 0xbf << 20); - MCHBAR16_AND_OR(SHC3C4REG2, ~0x1f7f, (0x0b << 8) | (7 << 4) | 0x0b); + mchbar32_and_or(CLOCKGATINGI, (u32)~0x00f00000, 0x00f00000); + mchbar32_and_or(CLOCKGATINGII - 1, (u32)~0x001ff000, 0xbf << 20); + mchbar16_and_or(SHC3C4REG2, (u16)~0x1f7f, (0x0b << 8) | (7 << 4) | 0x0b); MCHBAR16(SHC3C4REG3) = 0x3264; - MCHBAR16_AND_OR(SHC3C4REG4, ~0x3f3f, (0x14 << 8) | 0x0a); + mchbar16_and_or(SHC3C4REG4, (u16)~0x3f3f, (0x14 << 8) | 0x0a); - MCHBAR32_OR(C1COREBONUS, 0x80002000); + mchbar32_or(C1COREBONUS, 0x80002000); } static void sdram_programddr(void) { - MCHBAR16_AND_OR(CLOCKGATINGII, ~0x03ff, 0x0100); - MCHBAR16_AND_OR(CLOCKGATINGIII, ~0x003f, 0x0010); - MCHBAR16_AND_OR(CLOCKGATINGI, ~0x7000, 0x2000); + mchbar16_and_or(CLOCKGATINGII, (u16)~0x03ff, 0x0100); + mchbar16_and_or(CLOCKGATINGIII, (u16)~0x003f, 0x0010); + mchbar16_and_or(CLOCKGATINGI, (u16)~0x7000, 0x2000); - MCHBAR8_AND(CSHRPDCTL, ~0x0e); - MCHBAR8_AND(CSHRWRIOMLNS, ~0x0c); - MCHBAR8_AND(C0MISCCTLy(0), ~0x0e); - MCHBAR8_AND(C0MISCCTLy(1), ~0x0e); - MCHBAR8_AND(C0MISCCTLy(2), ~0x0e); - MCHBAR8_AND(C0MISCCTLy(3), ~0x0e); - MCHBAR8_AND(C0MISCCTLy(4), ~0x0e); - MCHBAR8_AND(C0MISCCTLy(5), ~0x0e); - MCHBAR8_AND(C0MISCCTLy(6), ~0x0e); - MCHBAR8_AND(C0MISCCTLy(7), ~0x0e); - MCHBAR8_AND(CSHRWRIOMLNS, ~0x02); + mchbar8_and(CSHRPDCTL, (u8)~0x0e); + mchbar8_and(CSHRWRIOMLNS, (u8)~0x0c); + mchbar8_and(C0MISCCTLy(0), (u8)~0x0e); + mchbar8_and(C0MISCCTLy(1), (u8)~0x0e); + mchbar8_and(C0MISCCTLy(2), (u8)~0x0e); + mchbar8_and(C0MISCCTLy(3), (u8)~0x0e); + mchbar8_and(C0MISCCTLy(4), (u8)~0x0e); + mchbar8_and(C0MISCCTLy(5), (u8)~0x0e); + mchbar8_and(C0MISCCTLy(6), (u8)~0x0e); + mchbar8_and(C0MISCCTLy(7), (u8)~0x0e); + mchbar8_and(CSHRWRIOMLNS, (u8)~0x02); - MCHBAR16_AND(CSHRMISCCTL, ~0x0400); - MCHBAR16_AND(CLOCKGATINGIII, ~0x0dc0); - MCHBAR8_AND(C0WRDPYN, ~0x80); - MCHBAR32_AND(C0COREBONUS, ~(1 << 22)); - MCHBAR16_AND(CLOCKGATINGI, ~0x80fc); - MCHBAR16_AND(CLOCKGATINGII, ~0x0c00); + mchbar16_and(CSHRMISCCTL, (u16)~0x0400); + mchbar16_and(CLOCKGATINGIII, (u16)~0x0dc0); + mchbar8_and(C0WRDPYN, (u8)~0x80); + mchbar32_and(C0COREBONUS, (u32)~(1 << 22)); + mchbar16_and(CLOCKGATINGI, (u16)~0x80fc); + mchbar16_and(CLOCKGATINGII, (u16)~0x0c00); - MCHBAR8_AND(CSHRPDCTL, ~0x0d); - MCHBAR8_AND(C0MISCCTLy(0), ~1); - MCHBAR8_AND(C0MISCCTLy(1), ~1); - MCHBAR8_AND(C0MISCCTLy(2), ~1); - MCHBAR8_AND(C0MISCCTLy(3), ~1); - MCHBAR8_AND(C0MISCCTLy(4), ~1); - MCHBAR8_AND(C0MISCCTLy(5), ~1); - MCHBAR8_AND(C0MISCCTLy(6), ~1); - MCHBAR8_AND(C0MISCCTLy(7), ~1); + mchbar8_and(CSHRPDCTL, (u8)~0x0d); + mchbar8_and(C0MISCCTLy(0), (u8)~1); + mchbar8_and(C0MISCCTLy(1), (u8)~1); + mchbar8_and(C0MISCCTLy(2), (u8)~1); + mchbar8_and(C0MISCCTLy(3), (u8)~1); + mchbar8_and(C0MISCCTLy(4), (u8)~1); + mchbar8_and(C0MISCCTLy(5), (u8)~1); + mchbar8_and(C0MISCCTLy(6), (u8)~1); + mchbar8_and(C0MISCCTLy(7), (u8)~1); - MCHBAR32_AND_OR(C0STATRDCTRL, ~0x00700000, 3 << 20); - MCHBAR32_AND(C0COREBONUS, ~0x00100000); - MCHBAR8_OR(C0DYNSLVDLLEN, 0x1e); - MCHBAR8_OR(C0DYNSLVDLLEN2, 0x03); - MCHBAR32_AND_OR(SHCYCTRKCKEL, ~0x0c000000, 0x04000000); - MCHBAR16_OR(C0STATRDCTRL, 0x6000); - MCHBAR32_OR(C0CKECTRL, 0x00010000); - MCHBAR8_OR(C0COREBONUS, 0x10); - MCHBAR32_OR(CLOCKGATINGI - 1, 0xf << 24); - MCHBAR8_OR(CSHWRIOBONUS, 0x07); - MCHBAR8_OR(C0DYNSLVDLLEN, 0xc0); - MCHBAR8_OR(SHC2REGIII, 7); - MCHBAR16_AND_OR(SHC2MINTM, ~0xffff, 0x0080); - MCHBAR8_AND_OR(SHC2IDLETM, ~0xff, 0x10); - MCHBAR16_OR(C0COREBONUS, 0x01e0); - MCHBAR8_OR(CSHWRIOBONUS, 0x18); - MCHBAR8_OR(CSHRMSTDYNDLLENB, 0x0d); - MCHBAR16_OR(SHC3C4REG1, 0x0a3f); - MCHBAR8_OR(C0STATRDCTRL, 3); - MCHBAR8_AND_OR(C0REFRCTRL2, ~0xff, 0x4a); - MCHBAR8_AND(C0COREBONUS + 4, ~0x60); - MCHBAR16_OR(C0DYNSLVDLLEN, 0x0321); + mchbar32_and_or(C0STATRDCTRL, (u32)~0x00700000, 3 << 20); + mchbar32_and(C0COREBONUS, (u32)~0x00100000); + mchbar8_or(C0DYNSLVDLLEN, 0x1e); + mchbar8_or(C0DYNSLVDLLEN2, 0x03); + mchbar32_and_or(SHCYCTRKCKEL, (u32)~0x0c000000, 0x04000000); + mchbar16_or(C0STATRDCTRL, 0x6000); + mchbar32_or(C0CKECTRL, 0x00010000); + mchbar8_or(C0COREBONUS, 0x10); + mchbar32_or(CLOCKGATINGI - 1, 0xf << 24); + mchbar8_or(CSHWRIOBONUS, 0x07); + mchbar8_or(C0DYNSLVDLLEN, 0xc0); + mchbar8_or(SHC2REGIII, 7); + mchbar16_and_or(SHC2MINTM, (u16)~0xffff, 0x0080); + mchbar8_and_or(SHC2IDLETM, (u8)~0xff, 0x10); + mchbar16_or(C0COREBONUS, 0x01e0); + mchbar8_or(CSHWRIOBONUS, 0x18); + mchbar8_or(CSHRMSTDYNDLLENB, 0x0d); + mchbar16_or(SHC3C4REG1, 0x0a3f); + mchbar8_or(C0STATRDCTRL, 3); + mchbar8_and_or(C0REFRCTRL2, (u8)~0xff, 0x4a); + mchbar8_and(C0COREBONUS + 4, (u8)~0x60); + mchbar16_or(C0DYNSLVDLLEN, 0x0321); } static void sdram_programdqdqs(struct sysinfo *s) @@ -2541,13 +2542,13 @@ if ((tmaxunmask >= reg32) && tmaxpi >= dqdqs_delay) { if (repeat == 2) { - MCHBAR32_AND(C0COREBONUS, ~(1 << 23)); + mchbar32_and(C0COREBONUS, (u32)~(1 << 23)); } feature = 1; repeat = 0; } else { repeat--; - MCHBAR32_OR(C0COREBONUS, 1 << 23); + mchbar32_or(C0COREBONUS, 1 << 23); cwb = 2 * mdclk; } } @@ -2556,10 +2557,10 @@ MCHBAR8(CLOCKGATINGI) = MCHBAR8(CLOCKGATINGI) & ~0x3; return; } - MCHBAR8_OR(CLOCKGATINGI, 3); - MCHBAR16_AND_OR(CLOCKGATINGIII, ~0xf000, pimdclk << 12); - MCHBAR8_AND_OR(CSHWRIOBONUSX, ~0x77, (push << 4) | push); - MCHBAR32_AND_OR(C0COREBONUS, ~0x0f000000, 0x03000000); + mchbar8_or(CLOCKGATINGI, 3); + mchbar16_and_or(CLOCKGATINGIII, (u16)~0xf000, pimdclk << 12); + mchbar8_and_or(CSHWRIOBONUSX, (u8)~0x77, (push << 4) | push); + mchbar32_and_or(C0COREBONUS, (u32)~0x0f000000, 0x03000000); } /** @@ -2592,7 +2593,7 @@ /* Enable HPET */ enable_hpet(); - MCHBAR16_OR(CPCTL, 1 << 15); + mchbar16_or(CPCTL, 1 << 15); sdram_clk_crossing(&si); @@ -2627,16 +2628,16 @@ PRINTK_DEBUG("Done mmap\n"); /* Enable DDR IO buffer */ - MCHBAR8_AND_OR(C0IOBUFACTCTL, ~0x3f, 0x08); - MCHBAR8_OR(C0RSTCTL, 1); + mchbar8_and_or(C0IOBUFACTCTL, (u8)~0x3f, 0x08); + mchbar8_or(C0RSTCTL, 1); sdram_rcompupdate(&si); PRINTK_DEBUG("Done RCOMP update\n"); - MCHBAR8_OR(HIT4, 2); + mchbar8_or(HIT4, 2); if (si.boot_path != BOOT_PATH_RESUME) { - MCHBAR32_OR(C0CKECTRL, 1 << 27); + mchbar32_or(C0CKECTRL, 1 << 27); sdram_jedecinit(&si); PRINTK_DEBUG("Done MRS\n"); @@ -2649,7 +2650,7 @@ PRINTK_DEBUG("Done zqcl\n"); if (si.boot_path != BOOT_PATH_RESUME) { - MCHBAR32_OR(C0REFRCTRL2, 3 << 30); + mchbar32_or(C0REFRCTRL2, 3 << 30); } sdram_dradrb(&si); @@ -2680,7 +2681,7 @@ PRINTK_DEBUG("Done periodic RCOMP\n"); /* Set init done */ - MCHBAR32_OR(C0REFRCTRL2, 1 << 30); + mchbar32_or(C0REFRCTRL2, 1 << 30); /* Tell ICH7 that we're done */ pci_and_config8(PCI_DEV(0, 0x1f, 0), 0xa2, (u8)~(1 << 7)); -- To view, visit
https://review.coreboot.org/c/coreboot/+/45517
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I5fa844a8a13a75d6d802ca48f72c513bfa16d0a5 Gerrit-Change-Number: 45517 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-MessageType: newchange
[View Less]
5
74
0
0
Change in coreboot[master]: soc/intel/braswell: Convert to ASL 2.0 syntax
by HAOUAS Elyes (Code Review)
17 Feb '21
17 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/46237
) Change subject: soc/intel/braswell: Convert to ASL 2.0 syntax ...................................................................... soc/intel/braswell: Convert to ASL 2.0 syntax Change-Id: Ie353ee16c80cc720202c5e32a20c8630acbba84e Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/soc/intel/braswell/acpi/dptf/charger.asl M src/soc/intel/braswell/acpi/dptf/cpu.asl M src/soc/
…
[View More]
intel/braswell/acpi/dptf/dptf.asl M src/soc/intel/braswell/acpi/dptf/thermal.asl M src/soc/intel/braswell/acpi/dptf/wifi.asl M src/soc/intel/braswell/acpi/dptf/wwan.asl M src/soc/intel/braswell/acpi/globalnvs.asl M src/soc/intel/braswell/acpi/gpio.asl M src/soc/intel/braswell/acpi/irqlinks.asl M src/soc/intel/braswell/acpi/lpc.asl M src/soc/intel/braswell/acpi/lpe.asl M src/soc/intel/braswell/acpi/lpss.asl M src/soc/intel/braswell/acpi/scc.asl M src/soc/intel/braswell/acpi/southcluster.asl 14 files changed, 185 insertions(+), 186 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/37/46237/1 diff --git a/src/soc/intel/braswell/acpi/dptf/charger.asl b/src/soc/intel/braswell/acpi/dptf/charger.asl index fca9590..97c8355 100644 --- a/src/soc/intel/braswell/acpi/dptf/charger.asl +++ b/src/soc/intel/braswell/acpi/dptf/charger.asl @@ -9,7 +9,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -26,11 +26,11 @@ Method (PPPC) { /* Convert size of PPSS table to index */ - Store (SizeOf (\_SB.CHPS), Local0) - Decrement (Local0) + Local0 = SizeOf (\_SB.CHPS) + Local0-- /* Check if charging is disabled (AC removed) */ - If (LEqual (\_SB.PCI0.LPCB.EC0.ACEX, Zero)) { + If (\_SB.PCI0.LPCB.EC0.ACEX == 0) { /* Return last power state */ Return (Local0) } Else { @@ -45,8 +45,7 @@ Method (SPPC, 1) { /* Retrieve Control (index 4) for specified PPSS level */ - Store (DeRefOf (Index (DeRefOf (Index - (\_SB.CHPS, ToInteger (Arg0))), 4)), Local0) + Local0 = DeRefOf (DeRefOf (\_SB.CHPS [ToInteger (Arg0)]) [4]) /* Pass Control value to EC to limit charging */ \_SB.PCI0.LPCB.EC0.CHGS (Local0) diff --git a/src/soc/intel/braswell/acpi/dptf/cpu.asl b/src/soc/intel/braswell/acpi/dptf/cpu.asl index e219c99..728d094 100644 --- a/src/soc/intel/braswell/acpi/dptf/cpu.asl +++ b/src/soc/intel/braswell/acpi/dptf/cpu.asl @@ -40,7 +40,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -100,8 +100,8 @@ Method (_TDL) { If (CondRefOf (\_SB.CP00._TSS)) { - Store (SizeOf (\_SB.CP00._TSS ()), Local0) - Decrement (Local0) + Local0 = SizeOf (\_SB.CP00._TSS ()) + Local0-- Return (Local0) } Else { Return (0) @@ -119,7 +119,7 @@ Method (SPPC, 1) { - Store (Arg0, \PPCM) + \PPCM = Arg0 /* Notify OS to re-read _PPC limit on each CPU */ \PPCN () @@ -143,8 +143,8 @@ If (CondRefOf (\_SB.MPDL)) { Return (\_SB.MPDL) } ElseIf (CondRefOf (\_SB.CP00._PSS)) { - Store (SizeOf (\_SB.CP00._PSS ()), Local0) - Decrement (Local0) + Local0 = SizeOf (\_SB.CP00._PSS ()) + Local0-- Return (Local0) } Else { Return (0) diff --git a/src/soc/intel/braswell/acpi/dptf/dptf.asl b/src/soc/intel/braswell/acpi/dptf/dptf.asl index b41effc..4897159 100644 --- a/src/soc/intel/braswell/acpi/dptf/dptf.asl +++ b/src/soc/intel/braswell/acpi/dptf/dptf.asl @@ -19,7 +19,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -36,7 +36,7 @@ Method (_OSC, 4, Serialized) { /* Check for Passive Policy UUID */ - If (LEqual (DeRefOf (Index (IDSP, 0)), Arg0)) { + If (DeRefOf (IDSP [0]) == Arg0) { /* Initialize Thermal Devices */ ^TINI () @@ -60,10 +60,10 @@ /* Convert from Degrees C to 1/10 Kelvin for ACPI */ Method (CTOK, 1) { /* 10th of Degrees C */ - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10 /* Convert to Kelvin */ - Add (Local0, 2732, Local0) + Local0 += 2732 Return (Local0) } diff --git a/src/soc/intel/braswell/acpi/dptf/thermal.asl b/src/soc/intel/braswell/acpi/dptf/thermal.asl index 3d92487..2f49ffe 100644 --- a/src/soc/intel/braswell/acpi/dptf/thermal.asl +++ b/src/soc/intel/braswell/acpi/dptf/thermal.asl @@ -6,20 +6,20 @@ #if CONFIG(EC_SUPPORTS_DPTF_TEVT) Method (TEVT, 1, NotSerialized) { - Store (ToInteger (Arg0), Local0) + Local0 = ToInteger (Arg0) #ifdef DPTF_TSR0_SENSOR_ID - If (LEqual (Local0, DPTF_TSR0_SENSOR_ID)) { + If (Local0 == DPTF_TSR0_SENSOR_ID) { Notify (^TSR0, 0x90) } #endif #ifdef DPTF_TSR1_SENSOR_ID - If (LEqual (Local0, DPTF_TSR1_SENSOR_ID)) { + If (Local0 == DPTF_TSR1_SENSOR_ID) { Notify (^TSR1, 0x90) } #endif #ifdef DPTF_TSR2_SENSOR_ID - If (LEqual (Local0, DPTF_TSR2_SENSOR_ID)) { + If (Local0 == DPTF_TSR2_SENSOR_ID) { Notify (^TSR2, 0x90) } #endif @@ -52,7 +52,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -108,7 +108,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -164,7 +164,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) diff --git a/src/soc/intel/braswell/acpi/dptf/wifi.asl b/src/soc/intel/braswell/acpi/dptf/wifi.asl index 0554d61..9ea9ef6 100644 --- a/src/soc/intel/braswell/acpi/dptf/wifi.asl +++ b/src/soc/intel/braswell/acpi/dptf/wifi.asl @@ -9,7 +9,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) diff --git a/src/soc/intel/braswell/acpi/dptf/wwan.asl b/src/soc/intel/braswell/acpi/dptf/wwan.asl index f40889d..91dbf93 100644 --- a/src/soc/intel/braswell/acpi/dptf/wwan.asl +++ b/src/soc/intel/braswell/acpi/dptf/wwan.asl @@ -9,7 +9,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) diff --git a/src/soc/intel/braswell/acpi/globalnvs.asl b/src/soc/intel/braswell/acpi/globalnvs.asl index c983d93..a68fde1 100644 --- a/src/soc/intel/braswell/acpi/globalnvs.asl +++ b/src/soc/intel/braswell/acpi/globalnvs.asl @@ -66,27 +66,27 @@ /* Set flag to enable USB charging in S3 */ Method (S3UE) { - Store (One, \S3U0) - Store (One, \S3U1) + \S3U0 = 1 + \S3U1 = 1 } /* Set flag to disable USB charging in S3 */ Method (S3UD) { - Store (Zero, \S3U0) - Store (Zero, \S3U1) + \S3U0 = 0 + \S3U1 = 0 } /* Set flag to enable USB charging in S5 */ Method (S5UE) { - Store (One, \S5U0) - Store (One, \S5U1) + \S5U0 = 1 + \S5U1 = 1 } /* Set flag to disable USB charging in S5 */ Method (S5UD) { - Store (Zero, \S5U0) - Store (Zero, \S5U1) + \S5U0 = 0 + \S5U1 = 0 } diff --git a/src/soc/intel/braswell/acpi/gpio.asl b/src/soc/intel/braswell/acpi/gpio.asl index ee26b3c3..36fdbe8 100644 --- a/src/soc/intel/braswell/acpi/gpio.asl +++ b/src/soc/intel/braswell/acpi/gpio.asl @@ -22,7 +22,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RMEM._BAS, RBAS) - Add (IO_BASE_ADDRESS, COMMUNITY_OFFSET_GPSOUTHWEST, RBAS) + RBAS = IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPSOUTHWEST Return (^RBUF) } @@ -51,7 +51,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RMEM._BAS, RBAS) - Add (IO_BASE_ADDRESS, COMMUNITY_OFFSET_GPNORTH, RBAS) + RBAS = IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPNORTH, Return (^RBUF) } @@ -80,7 +80,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RMEM._BAS, RBAS) - Add (IO_BASE_ADDRESS, COMMUNITY_OFFSET_GPEAST, RBAS) + RBAS = IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPEAST Return (^RBUF) } @@ -109,7 +109,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RMEM._BAS, RBAS) - Add (IO_BASE_ADDRESS, COMMUNITY_OFFSET_GPSOUTHEAST, RBAS) + RBAS = IO_BASE_ADDRESS + COMMUNITY_OFFSET_GPSOUTHEAST Return (^RBUF) } diff --git a/src/soc/intel/braswell/acpi/irqlinks.asl b/src/soc/intel/braswell/acpi/irqlinks.asl index 6f88459..b1d9d6a 100644 --- a/src/soc/intel/braswell/acpi/irqlinks.asl +++ b/src/soc/intel/braswell/acpi/irqlinks.asl @@ -8,7 +8,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTA) + PRTA = 0x80 } /* Possible Resource Settings for this Link */ @@ -28,10 +28,10 @@ CreateWordField(RTLA, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTA */ - ShiftLeft(1, And(PRTA, 0x0f), IRQ0) + IRQ0 = 1 << (PRTA & 0x0f) Return (RTLA) } @@ -44,14 +44,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTA) + Local0-- + PRTA = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTA, 0x80)) { + If (PRTA & 0x80) { Return (0x9) } Else { Return (0xb) @@ -67,7 +67,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTB) + PRTB = 0x80 } /* Possible Resource Settings for this Link */ @@ -87,10 +87,10 @@ CreateWordField(RTLB, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTB */ - ShiftLeft(1, And(PRTB, 0x0f), IRQ0) + IRQ0 = 1 << (PRTB & 0x0f) Return (RTLB) } @@ -103,14 +103,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTB) + Local0-- + PRTB = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTB, 0x80)) { + If (PRTB & 0x80) { Return (0x9) } Else { Return (0xb) @@ -126,7 +126,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTC) + PRTC = 0x80 } /* Possible Resource Settings for this Link */ @@ -146,10 +146,10 @@ CreateWordField(RTLC, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTC */ - ShiftLeft(1, And(PRTC, 0x0f), IRQ0) + IRQ0 = 1 << (PRTC & 0x0f) Return (RTLC) } @@ -162,14 +162,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTC) + Local0-- + PRTC = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTC, 0x80)) { + If (PRTC & 0x80) { Return (0x9) } Else { Return (0xb) @@ -185,7 +185,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTD) + PRTD = 0x80 } /* Possible Resource Settings for this Link */ @@ -205,10 +205,10 @@ CreateWordField(RTLD, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTD */ - ShiftLeft(1, And(PRTD, 0x0f), IRQ0) + IRQ0 = 1 << (PRTD & 0x0f) Return (RTLD) } @@ -221,14 +221,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTD) + Local0-- + PRTD = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTD, 0x80)) { + If (PRTD & 0x80) { Return (0x9) } Else { Return (0xb) @@ -244,7 +244,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTE) + PRTE = 0x80 } /* Possible Resource Settings for this Link */ @@ -264,10 +264,10 @@ CreateWordField(RTLE, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTE */ - ShiftLeft(1, And(PRTE, 0x0f), IRQ0) + IRQ0 = 1 << (PRTE & 0x0f) Return (RTLE) } @@ -280,14 +280,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTE) + Local0-- + PRTE = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTE, 0x80)) { + If (PRTE & 0x80) { Return (0x9) } Else { Return (0xb) @@ -303,7 +303,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTF) + PRTF = 0x80 } /* Possible Resource Settings for this Link */ @@ -323,10 +323,10 @@ CreateWordField(RTLF, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTF */ - ShiftLeft(1, And(PRTF, 0x0f), IRQ0) + IRQ0 = 1 << (PRTF & 0x0f) Return (RTLF) } @@ -339,14 +339,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTF) + Local0-- + PRTF = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTF, 0x80)) { + If (PRTF & 0x80) { Return (0x9) } Else { Return (0xb) @@ -362,7 +362,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTG) + PRTG = 0x80 } /* Possible Resource Settings for this Link */ @@ -382,10 +382,10 @@ CreateWordField(RTLG, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTG */ - ShiftLeft(1, And(PRTG, 0x0f), IRQ0) + IRQ0 = 1 << (PRTG & 0x0f) Return (RTLG) } @@ -398,14 +398,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTG) + Local0-- + PRTG = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTG, 0x80)) { + If (PRTG & 0x80) { Return (0x9) } Else { Return (0xb) @@ -421,7 +421,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTH) + PRTH = 0x80 } /* Possible Resource Settings for this Link */ @@ -441,10 +441,10 @@ CreateWordField(RTLH, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTH */ - ShiftLeft(1, And(PRTH, 0x0f), IRQ0) + IRQ0 = 1 << (PRTH & 0x0f) Return (RTLH) } @@ -457,14 +457,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTH) + Local0-- + PRTH = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTH, 0x80)) { + If (PRTH & 0x80) { Return (0x9) } Else { Return (0xb) diff --git a/src/soc/intel/braswell/acpi/lpc.asl b/src/soc/intel/braswell/acpi/lpc.asl index 0a22162..53598ef 100644 --- a/src/soc/intel/braswell/acpi/lpc.asl +++ b/src/soc/intel/braswell/acpi/lpc.asl @@ -35,9 +35,9 @@ { CreateDwordField (^RBUF, ^FBAR._BAS, FBAS) CreateDwordField (^RBUF, ^FBAR._LEN, FLEN) - Multiply(CONFIG_COREBOOT_ROMSIZE_KB, 1024, Local0) - Store(Local0, FLEN) - Add(Subtract(0xffffffff, Local0), 1, FBAS) + Local0 = CONFIG_COREBOOT_ROMSIZE_KB * 1024 + FLEN = Local0 + FBAS = 0xffffffff - Local0 + 1 Return (^RBUF) } } diff --git a/src/soc/intel/braswell/acpi/lpe.asl b/src/soc/intel/braswell/acpi/lpe.asl index d655ae8..8b8444a 100644 --- a/src/soc/intel/braswell/acpi/lpe.asl +++ b/src/soc/intel/braswell/acpi/lpe.asl @@ -43,15 +43,15 @@ { /* Update BAR0 from NVS */ CreateDwordField (^RBUF, ^BAR0._BAS, BAS0) - Store (\LPB0, BAS0) + BAS0 = \LPB0 /* Update BAR1 from NVS */ CreateDwordField (^RBUF, ^BAR1._BAS, BAS1) - Store (\LPB1, BAS1) + BAS1 = \LPB1 /* Update LPE FW from NVS */ CreateDwordField (^RBUF, ^BAR2._BAS, BAS2) - Store (\LPFW, BAS2) + BAS2 = \LPFW /* Append any Mainboard defined GPIOs */ If (CondRefOf (^GBUF)) { @@ -64,7 +64,7 @@ Method (_STA) { - If (LEqual (\LPEN, 1)) { + If (\LPEN == 1) { Return (0xF) } Else { Return (0x0) @@ -87,14 +87,14 @@ Method (_OFF) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_ON) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } } diff --git a/src/soc/intel/braswell/acpi/lpss.asl b/src/soc/intel/braswell/acpi/lpss.asl index 2516a9f..0080a4f 100644 --- a/src/soc/intel/braswell/acpi/lpss.asl +++ b/src/soc/intel/braswell/acpi/lpss.asl @@ -49,13 +49,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S0B0, RBAS) + RBAS = \S0B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S0EN, 1)) { + If (\S0EN == 1) { Return (0xF) } Else { Return (0x0) @@ -81,13 +81,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S8B0, RBAS) + RBAS = \S8B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S8EN, 1)) { + If (\S8EN == 1) { Return (0xF) } Else { Return (0x0) @@ -121,13 +121,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S1B0, RBAS) + RBAS = \S1B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S1EN, 1)) { + If (\S1EN == 1) { Return (0xF) } Else { Return (0x0) @@ -143,14 +143,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -180,13 +180,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S2B0, RBAS) + RBAS = \S2B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S2EN, 1)) { + If (\S2EN == 1) { Return (0xF) } Else { Return (0x0) @@ -202,14 +202,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -239,13 +239,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S3B0, RBAS) + RBAS = \S3B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S3EN, 1)) { + If (\S3EN == 1) { Return (0xF) } Else { Return (0x0) @@ -261,14 +261,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -298,13 +298,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S4B0, RBAS) + RBAS = \S4B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S4EN, 1)) { + If (\S4EN == 1) { Return (0xF) } Else { Return (0x0) @@ -320,14 +320,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -357,13 +357,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S5B0, RBAS) + RBAS = \S5B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S5EN, 1)) { + If (\S5EN == 1) { Return (0xF) } Else { Return (0x0) @@ -379,14 +379,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -416,13 +416,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S6B0, RBAS) + RBAS = \S6B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S6EN, 1)) { + If (\S6EN == 1) { Return (0xF) } Else { Return (0x0) @@ -438,14 +438,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -475,13 +475,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S7B0, RBAS) + RBAS = \S7B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S7EN, 1)) { + If (\S7EN == 1) { Return (0xF) } Else { Return (0x0) @@ -497,14 +497,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -528,13 +528,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\SCB0, RBAS) + RBAS = \SCB0 Return (^RBUF) } Method (_STA) { - If (LEqual (\SCEN, 1)) { + If (\SCEN == 1) { Return (0xF) } Else { Return (0x0) @@ -550,14 +550,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -581,13 +581,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\SDB0, RBAS) + RBAS = \SDB0 Return (^RBUF) } Method (_STA) { - If (LEqual (\SDEN, 1)) { + If (\SDEN == 1) { Return (0xF) } Else { Return (0x0) @@ -603,13 +603,13 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } diff --git a/src/soc/intel/braswell/acpi/scc.asl b/src/soc/intel/braswell/acpi/scc.asl index 1260d0c..988e474 100644 --- a/src/soc/intel/braswell/acpi/scc.asl +++ b/src/soc/intel/braswell/acpi/scc.asl @@ -19,13 +19,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\C0B0, RBAS) + RBAS = \C0B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\C0EN, 1)) { + If (\C0EN == 1) { Return (0xF) } Else { Return (0x0) @@ -41,14 +41,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } Device (EM45) @@ -78,7 +78,7 @@ Method (_STA, 0, NotSerialized) { - If (LEqual (\C0EN, 1)) { + If (\C0EN == 1) { Return (0x0) } Else @@ -120,13 +120,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\C1B0, RBAS) + RBAS = \C1B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\C1EN, 1)) { + If (\C1EN == 1) { Return (0xF) } Else { Return (0x0) @@ -142,14 +142,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -172,13 +172,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\C2B0, RBAS) + RBAS = \C2B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\C2EN, 1)) { + If (\C2EN == 1) { Return (0xF) } Else { Return (0x0) @@ -194,13 +194,13 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } diff --git a/src/soc/intel/braswell/acpi/southcluster.asl b/src/soc/intel/braswell/acpi/southcluster.asl index 2c31d40..5deb0ff 100644 --- a/src/soc/intel/braswell/acpi/southcluster.asl +++ b/src/soc/intel/braswell/acpi/southcluster.asl @@ -161,17 +161,17 @@ CreateDWordField (MCRS, LMEM._MIN, LMIN) CreateDWordField (MCRS, LMEM._MAX, LMAX) CreateDWordField (MCRS, LMEM._LEN, LLEN) - If (LAnd (LNotEqual (LPFW, Zero), LEqual (LPEN, One))) + If ((LPFW != 0) && (LPEN == 1)) { - Store (LPFW, LMIN) - Store (Add (LMIN, 0x001FFFFF), LMAX) - Store (0x00200000, LLEN) + LMIN = LPFW + LMAX = LMIN + 0x001FFFFF + LLEN = 0x00200000 } Else { - Store (Zero, LMIN) - Store (Zero, LMAX) - Store (Zero, LLEN) + LMIN = 0 + LMAX = 0 + LLEN = 0 } /* Update PCI resource area */ @@ -180,9 +180,9 @@ CreateDwordField(MCRS, PMEM._LEN, PLEN) /* TOLM is BMBOUND accessible from IOSF so is saved in NVS */ - Store (\TOLM, PMIN) - Store (Subtract(CONFIG_MMCONF_BASE_ADDRESS, 1), PMAX) - Add (Subtract (PMAX, PMIN), 1, PLEN) + PMIN = \TOLM + PMAX = CONFIG_MMCONF_BASE_ADDRESS - 1 + PLEN = PMAX - PMIN + 1 Return (MCRS) } @@ -214,7 +214,7 @@ Method (_OSC, 4) { /* Check for proper GUID */ - If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) + If (Arg0 == ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")) { /* Let OS control everything */ Return (Arg3) @@ -223,7 +223,7 @@ { /* Unrecognized UUID */ CreateDWordField (Arg3, 0, CDW1) - Or (CDW1, 4, CDW1) + CDW1 |= 4 Return (Arg3) } } @@ -244,7 +244,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RBAR._BAS, RBAS) - Store (Add (MCFG_BASE_ADDRESS, 0xD0), RBAS) + RBAS = MCFG_BASE_ADDRESS + 0xD0 Return (^RBUF) } } -- To view, visit
https://review.coreboot.org/c/coreboot/+/46237
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: Ie353ee16c80cc720202c5e32a20c8630acbba84e Gerrit-Change-Number: 46237 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org> Gerrit-MessageType: newchange
[View Less]
1
2
0
0
Change in coreboot[master]: soc/intel/baytrail: Convert to ASL 2.0 syntax
by HAOUAS Elyes (Code Review)
17 Feb '21
17 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/46236
) Change subject: soc/intel/baytrail: Convert to ASL 2.0 syntax ...................................................................... soc/intel/baytrail: Convert to ASL 2.0 syntax Change-Id: I0033698580439f90ac91570f1a4e73f9b235e53a Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/soc/intel/baytrail/acpi/dptf/charger.asl M src/soc/intel/baytrail/acpi/dptf/cpu.asl M src/soc/
…
[View More]
intel/baytrail/acpi/dptf/dptf.asl M src/soc/intel/baytrail/acpi/dptf/thermal.asl M src/soc/intel/baytrail/acpi/globalnvs.asl M src/soc/intel/baytrail/acpi/gpio.asl M src/soc/intel/baytrail/acpi/irqlinks.asl M src/soc/intel/baytrail/acpi/lpe.asl M src/soc/intel/baytrail/acpi/lpss.asl M src/soc/intel/baytrail/acpi/scc.asl M src/soc/intel/baytrail/acpi/southcluster.asl M src/soc/intel/baytrail/acpi/xhci.asl 12 files changed, 183 insertions(+), 184 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/36/46236/1 diff --git a/src/soc/intel/baytrail/acpi/dptf/charger.asl b/src/soc/intel/baytrail/acpi/dptf/charger.asl index b8c6d14..908d3a9 100644 --- a/src/soc/intel/baytrail/acpi/dptf/charger.asl +++ b/src/soc/intel/baytrail/acpi/dptf/charger.asl @@ -9,7 +9,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -26,11 +26,11 @@ Method (PPPC) { /* Convert size of PPSS table to index */ - Store (SizeOf (\_SB.CHPS), Local0) - Decrement (Local0) + Local0 = SizeOf (\_SB.CHPS) + Local0-- /* Check if charging is disabled (AC removed) */ - If (LEqual (\PWRS, Zero)) { + If (\PWRS == 0) { /* Return last power state */ Return (Local0) } Else { @@ -45,8 +45,7 @@ Method (SPPC, 1) { /* Retrieve Control (index 4) for specified PPSS level */ - Store (DeRefOf (Index (DeRefOf (Index - (\_SB.CHPS, ToInteger (Arg0))), 4)), Local0) + Local0 = DeRefOf (DeRefOf (\_SB.CHPS [ToInteger (Arg0)]) [4]) /* Pass Control value to EC to limit charging */ \_SB.PCI0.LPCB.EC0.CHGS (Local0) diff --git a/src/soc/intel/baytrail/acpi/dptf/cpu.asl b/src/soc/intel/baytrail/acpi/dptf/cpu.asl index cd6a572..61eb452 100644 --- a/src/soc/intel/baytrail/acpi/dptf/cpu.asl +++ b/src/soc/intel/baytrail/acpi/dptf/cpu.asl @@ -13,7 +13,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -73,8 +73,8 @@ Method (_TDL) { If (CondRefOf (\_SB.CP00._TSS)) { - Store (SizeOf (\_SB.CP00._TSS ()), Local0) - Decrement (Local0) + Local0 = SizeOf (\_SB.CP00._TSS ()) + Local0-- Return (Local0) } Else { Return (0) @@ -92,7 +92,7 @@ Method (SPPC, 1) { - Store (Arg0, \PPCM) + \PPCM = Arg0 /* Notify OS to re-read _PPC limit on each CPU */ \PPCN () @@ -116,8 +116,8 @@ If (CondRefOf (\_SB.MPDL)) { Return (\_SB.MPDL) } ElseIf (CondRefOf (\_SB.CP00._PSS)) { - Store (SizeOf (\_SB.CP00._PSS ()), Local0) - Decrement (Local0) + Local0 = SizeOf (\_SB.CP00._PSS ()) + Local0-- Return (Local0) } Else { Return (0) diff --git a/src/soc/intel/baytrail/acpi/dptf/dptf.asl b/src/soc/intel/baytrail/acpi/dptf/dptf.asl index 66bfa45..3f49fe5 100644 --- a/src/soc/intel/baytrail/acpi/dptf/dptf.asl +++ b/src/soc/intel/baytrail/acpi/dptf/dptf.asl @@ -19,7 +19,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -36,7 +36,7 @@ Method (_OSC, 4, Serialized) { /* Check for Passive Policy UUID */ - If (LEqual (DeRefOf (Index (IDSP, 0)), Arg0)) { + If (DeRefOf (IDSP [0]) == Arg0) { /* Initialize Thermal Devices */ ^TINI () @@ -60,10 +60,10 @@ /* Convert from Degrees C to 1/10 Kelvin for ACPI */ Method (CTOK, 1) { /* 10th of Degrees C */ - Multiply (Arg0, 10, Local0) + Local0 = Arg0 * 10 /* Convert to Kelvin */ - Add (Local0, 2732, Local0) + Local0 += 2732 Return (Local0) } diff --git a/src/soc/intel/baytrail/acpi/dptf/thermal.asl b/src/soc/intel/baytrail/acpi/dptf/thermal.asl index 816c169..1f99301 100644 --- a/src/soc/intel/baytrail/acpi/dptf/thermal.asl +++ b/src/soc/intel/baytrail/acpi/dptf/thermal.asl @@ -6,20 +6,20 @@ #if CONFIG(EC_SUPPORTS_DPTF_TEVT) Method (TEVT, 1, NotSerialized) { - Store (ToInteger (Arg0), Local0) + Local0 = ToInteger (Arg0) #ifdef DPTF_TSR0_SENSOR_ID - If (LEqual (Local0, DPTF_TSR0_SENSOR_ID)) { + If (Local0 == DPTF_TSR0_SENSOR_ID) { Notify (^TSR0, 0x90) } #endif #ifdef DPTF_TSR1_SENSOR_ID - If (LEqual (Local0, DPTF_TSR1_SENSOR_ID)) { + If (Local0 == DPTF_TSR1_SENSOR_ID) { Notify (^TSR1, 0x90) } #endif #ifdef DPTF_TSR2_SENSOR_ID - If (LEqual (Local0, DPTF_TSR2_SENSOR_ID)) { + If (Local0 == DPTF_TSR2_SENSOR_ID) { Notify (^TSR2, 0x90) } #endif @@ -52,7 +52,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -108,7 +108,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -164,7 +164,7 @@ Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) diff --git a/src/soc/intel/baytrail/acpi/globalnvs.asl b/src/soc/intel/baytrail/acpi/globalnvs.asl index c472d06..5fca68d 100644 --- a/src/soc/intel/baytrail/acpi/globalnvs.asl +++ b/src/soc/intel/baytrail/acpi/globalnvs.asl @@ -65,27 +65,27 @@ /* Set flag to enable USB charging in S3 */ Method (S3UE) { - Store (One, \S3U0) - Store (One, \S3U1) + \S3U0 = 1 + \S3U1 = 1 } /* Set flag to disable USB charging in S3 */ Method (S3UD) { - Store (Zero, \S3U0) - Store (Zero, \S3U1) + \S3U0 = 0 + \S3U1 = 0 } /* Set flag to enable USB charging in S5 */ Method (S5UE) { - Store (One, \S5U0) - Store (One, \S5U1) + \S5U0 = 1 + \S5U1 = 1 } /* Set flag to disable USB charging in S5 */ Method (S5UD) { - Store (Zero, \S5U0) - Store (Zero, \S5U1) + \S5U0 = 0 + \S5U1 = 0 } diff --git a/src/soc/intel/baytrail/acpi/gpio.asl b/src/soc/intel/baytrail/acpi/gpio.asl index 4e48cc6..e6dc536 100644 --- a/src/soc/intel/baytrail/acpi/gpio.asl +++ b/src/soc/intel/baytrail/acpi/gpio.asl @@ -22,7 +22,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RMEM._BAS, RBAS) - Add (IO_BASE_ADDRESS, IO_BASE_OFFSET_GPSCORE, RBAS) + RBAS = IO_BASE_ADDRESS + IO_BASE_OFFSET_GPSCORE Return (^RBUF) } @@ -51,7 +51,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RMEM._BAS, RBAS) - Add (IO_BASE_ADDRESS, IO_BASE_OFFSET_GPNCORE, RBAS) + RBAS = IO_BASE_ADDRESS + IO_BASE_OFFSET_GPNCORE Return (^RBUF) } @@ -80,7 +80,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RMEM._BAS, RBAS) - Add (IO_BASE_ADDRESS, IO_BASE_OFFSET_GPSSUS, RBAS) + RBAS = IO_BASE_ADDRESS + IO_BASE_OFFSET_GPSSUS Return (^RBUF) } diff --git a/src/soc/intel/baytrail/acpi/irqlinks.asl b/src/soc/intel/baytrail/acpi/irqlinks.asl index ef3bdd4..af89c33 100644 --- a/src/soc/intel/baytrail/acpi/irqlinks.asl +++ b/src/soc/intel/baytrail/acpi/irqlinks.asl @@ -8,7 +8,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTA) + PRTA = 0x80 } /* Possible Resource Settings for this Link */ @@ -28,10 +28,10 @@ CreateWordField(RTLA, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTA */ - ShiftLeft(1, And(PRTA, 0x0f), IRQ0) + IRQ0 = 1 << (PRTA & 0x0f) Return (RTLA) } @@ -44,14 +44,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTA) + Local0-- + PRTA = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTA, 0x80)) { + If (PRTA & 0x80) { Return (0x9) } Else { Return (0xb) @@ -67,7 +67,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTB) + PRTB = 0x80 } /* Possible Resource Settings for this Link */ @@ -87,10 +87,10 @@ CreateWordField(RTLB, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTB */ - ShiftLeft(1, And(PRTB, 0x0f), IRQ0) + IRQ0 = 1 << (PRTB & 0x0f) Return (RTLB) } @@ -103,14 +103,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTB) + Local0-- + PRTB = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTB, 0x80)) { + If (PRTB & 0x80) { Return (0x9) } Else { Return (0xb) @@ -126,7 +126,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTC) + PRTC = 0x80 } /* Possible Resource Settings for this Link */ @@ -146,10 +146,10 @@ CreateWordField(RTLC, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTC */ - ShiftLeft(1, And(PRTC, 0x0f), IRQ0) + IRQ0 = 1 << (PRTC & 0x0f) Return (RTLC) } @@ -162,14 +162,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTC) + Local0-- + PRTC = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTC, 0x80)) { + If (PRTC & 0x80) { Return (0x9) } Else { Return (0xb) @@ -185,7 +185,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTD) + PRTD = 0x80 } /* Possible Resource Settings for this Link */ @@ -205,10 +205,10 @@ CreateWordField(RTLD, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTD */ - ShiftLeft(1, And(PRTD, 0x0f), IRQ0) + IRQ0 = 1 << (PRTD & 0x0f) Return (RTLD) } @@ -221,14 +221,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTD) + Local0-- + PRTD = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTD, 0x80)) { + If (PRTD & 0x80) { Return (0x9) } Else { Return (0xb) @@ -244,7 +244,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTE) + PRTE = 0x80 } /* Possible Resource Settings for this Link */ @@ -264,10 +264,10 @@ CreateWordField(RTLE, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTE */ - ShiftLeft(1, And(PRTE, 0x0f), IRQ0) + IRQ0 = 1 << (PRTE & 0x0f) Return (RTLE) } @@ -280,14 +280,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTE) + Local0-- + PRTE = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTE, 0x80)) { + If (PRTE & 0x80) { Return (0x9) } Else { Return (0xb) @@ -303,7 +303,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTF) + PRTF = 0x80 } /* Possible Resource Settings for this Link */ @@ -323,10 +323,10 @@ CreateWordField(RTLF, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTF */ - ShiftLeft(1, And(PRTF, 0x0f), IRQ0) + IRQ0 = 1 << (PRTF & 0x0f) Return (RTLF) } @@ -339,14 +339,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTF) + Local0-- + PRTF = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTF, 0x80)) { + If (PRTF & 0x80) { Return (0x9) } Else { Return (0xb) @@ -362,7 +362,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTG) + PRTG = 0x80 } /* Possible Resource Settings for this Link */ @@ -382,10 +382,10 @@ CreateWordField(RTLG, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTG */ - ShiftLeft(1, And(PRTG, 0x0f), IRQ0) + IRQ0 = 1 << (PRTG & 0x0f) Return (RTLG) } @@ -398,14 +398,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTG) + Local0-- + PRTG = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTG, 0x80)) { + If (PRTG & 0x80) { Return (0x9) } Else { Return (0xb) @@ -421,7 +421,7 @@ /* Disable method */ Method (_DIS, 0, Serialized) { - Store (0x80, PRTH) + PRTH = 0x80 } /* Possible Resource Settings for this Link */ @@ -441,10 +441,10 @@ CreateWordField(RTLH, 1, IRQ0) /* Clear the WordField */ - Store (Zero, IRQ0) + IRQ0 = 0 /* Set the bit from PRTH */ - ShiftLeft(1, And(PRTH, 0x0f), IRQ0) + IRQ0 = 1 << (PRTH & 0x0f) Return (RTLH) } @@ -457,14 +457,14 @@ /* Which bit is set? */ FindSetRightBit(IRQ0, Local0) - Decrement(Local0) - Store(Local0, PRTH) + Local0-- + PRTH = Local0 } /* Status */ Method (_STA, 0, Serialized) { - If(And(PRTH, 0x80)) { + If (PRTH & 0x80) { Return (0x9) } Else { Return (0xb) diff --git a/src/soc/intel/baytrail/acpi/lpe.asl b/src/soc/intel/baytrail/acpi/lpe.asl index a0a08b8..0e52cc8 100644 --- a/src/soc/intel/baytrail/acpi/lpe.asl +++ b/src/soc/intel/baytrail/acpi/lpe.asl @@ -43,15 +43,15 @@ { /* Update BAR0 from NVS */ CreateDwordField (^RBUF, ^BAR0._BAS, BAS0) - Store (\LPB0, BAS0) + BAS0 = \LPB0 /* Update BAR1 from NVS */ CreateDwordField (^RBUF, ^BAR1._BAS, BAS1) - Store (\LPB1, BAS1) + BAS1 = \LPB1 /* Update LPE FW from NVS */ CreateDwordField (^RBUF, ^BAR2._BAS, BAS2) - Store (\LPFW, BAS2) + BAS2 = \LPFW /* Append any Mainboard defined GPIOs */ If (CondRefOf (^GBUF)) { @@ -64,7 +64,7 @@ Method (_STA) { - If (LEqual (\LPEN, 1)) { + If (\LPEN == 1) { Return (0xF) } Else { Return (0x0) @@ -87,14 +87,14 @@ Method (_OFF) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_ON) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } } diff --git a/src/soc/intel/baytrail/acpi/lpss.asl b/src/soc/intel/baytrail/acpi/lpss.asl index 6ba615d..94f16ea 100644 --- a/src/soc/intel/baytrail/acpi/lpss.asl +++ b/src/soc/intel/baytrail/acpi/lpss.asl @@ -18,13 +18,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S0B0, RBAS) + RBAS = \S0B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S0EN, 1)) { + If (\S0EN == 1) { Return (0xF) } Else { Return (0x0) @@ -50,13 +50,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S8B0, RBAS) + RBAS = \S8B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S8EN, 1)) { + If (\S8EN == 1) { Return (0xF) } Else { Return (0x0) @@ -90,13 +90,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S1B0, RBAS) + RBAS = \S1B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S1EN, 1)) { + If (\S1EN == 1) { Return (0xF) } Else { Return (0x0) @@ -112,14 +112,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -149,13 +149,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S2B0, RBAS) + RBAS = \S2B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S2EN, 1)) { + If (\S2EN == 1) { Return (0xF) } Else { Return (0x0) @@ -171,14 +171,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -208,13 +208,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S3B0, RBAS) + RBAS = \S3B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S3EN, 1)) { + If (\S3EN == 1) { Return (0xF) } Else { Return (0x0) @@ -230,14 +230,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -267,13 +267,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S4B0, RBAS) + RBAS = \S4B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S4EN, 1)) { + If (\S4EN == 1) { Return (0xF) } Else { Return (0x0) @@ -289,14 +289,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -326,13 +326,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S5B0, RBAS) + RBAS = \S5B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S5EN, 1)) { + If (\S5EN == 1) { Return (0xF) } Else { Return (0x0) @@ -348,14 +348,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -385,13 +385,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S6B0, RBAS) + RBAS = \S6B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S6EN, 1)) { + If (\S6EN == 1) { Return (0xF) } Else { Return (0x0) @@ -407,14 +407,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -444,13 +444,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S7B0, RBAS) + RBAS = \S7B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S7EN, 1)) { + If (\S7EN == 1) { Return (0xF) } Else { Return (0x0) @@ -466,14 +466,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -497,13 +497,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\S9B0, RBAS) + RBAS = \S9B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\S9EN, 1)) { + If (\S9EN == 1) { Return (0xF) } Else { Return (0x0) @@ -519,14 +519,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -544,13 +544,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\SAB0, RBAS) + RBAS = \SAB0 Return (^RBUF) } Method (_STA) { - If (LEqual (\SAEN, 1)) { + If (\SAEN == 1) { Return (0xF) } Else { Return (0x0) @@ -572,13 +572,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\SBB0, RBAS) + RBAS = \SBB0 Return (^RBUF) } Method (_STA) { - If (LEqual (\SBEN, 1)) { + If (\SBEN == 1) { Return (0xF) } Else { Return (0x0) @@ -606,13 +606,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\SCB0, RBAS) + RBAS = \SCB0 Return (^RBUF) } Method (_STA) { - If (LEqual (\SCEN, 1)) { + If (\SCEN == 1) { Return (0xF) } Else { Return (0x0) @@ -628,14 +628,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -659,13 +659,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\SDB0, RBAS) + RBAS = \SDB0 Return (^RBUF) } Method (_STA) { - If (LEqual (\SDEN, 1)) { + If (\SDEN == 1) { Return (0xF) } Else { Return (0x0) @@ -681,13 +681,13 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } diff --git a/src/soc/intel/baytrail/acpi/scc.asl b/src/soc/intel/baytrail/acpi/scc.asl index cf0debd..7f58687 100644 --- a/src/soc/intel/baytrail/acpi/scc.asl +++ b/src/soc/intel/baytrail/acpi/scc.asl @@ -19,13 +19,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\C0B0, RBAS) + RBAS = \C0B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\C0EN, 1)) { + If (\C0EN == 1) { Return (0xF) } Else { Return (0x0) @@ -41,14 +41,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } Device (EM45) @@ -82,13 +82,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\C1B0, RBAS) + RBAS = \C1B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\C1EN, 1)) { + If (\C1EN == 1) { Return (0xF) } Else { Return (0x0) @@ -104,14 +104,14 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } @@ -134,13 +134,13 @@ Method (_CRS) { CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) - Store (\C2B0, RBAS) + RBAS = \C2B0 Return (^RBUF) } Method (_STA) { - If (LEqual (\C2EN, 1)) { + If (\C2EN == 1) { Return (0xF) } Else { Return (0x0) @@ -156,13 +156,13 @@ Method (_PS3) { - Or (PSAT, 0x00000003, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT |= 0x00000003 + PSAT |= 0x00000000 } Method (_PS0) { - And (PSAT, 0xfffffffc, PSAT) - Or (PSAT, 0x00000000, PSAT) + PSAT &= 0xfffffffc + PSAT |= 0x00000000 } } diff --git a/src/soc/intel/baytrail/acpi/southcluster.asl b/src/soc/intel/baytrail/acpi/southcluster.asl index e3997d7..fb4a79c 100644 --- a/src/soc/intel/baytrail/acpi/southcluster.asl +++ b/src/soc/intel/baytrail/acpi/southcluster.asl @@ -158,9 +158,9 @@ CreateDwordField(MCRS, ^PMEM._LEN, PLEN) /* TOLM is BMBOUND accessible from IOSF so is saved in NVS */ - Store (\TOLM, PMIN) - Store (Subtract(CONFIG_MMCONF_BASE_ADDRESS, 1), PMAX) - Add (Subtract (PMAX, PMIN), 1, PLEN) + PMIN = \TOLM + PMAX = CONFIG_MMCONF_BASE_ADDRESS - 1 + PLEN = PMAX - PMIN + 1 Return (MCRS) } @@ -192,7 +192,7 @@ Method (_OSC, 4) { /* Check for proper GUID */ - If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) + If (Arg0 == ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")) { /* Let OS control everything */ Return (Arg3) @@ -201,7 +201,7 @@ { /* Unrecognized UUID */ CreateDWordField (Arg3, 0, CDW1) - Or (CDW1, 4, CDW1) + CDW1 |= 4 Return (Arg3) } } @@ -222,7 +222,7 @@ Method (_CRS) { CreateDwordField (^RBUF, ^RBAR._BAS, RBAS) - Store (Add (MCFG_BASE_ADDRESS, 0xD0), RBAS) + RBAS = MCFG_BASE_ADDRESS + 0xD0 Return (^RBUF) } } diff --git a/src/soc/intel/baytrail/acpi/xhci.asl b/src/soc/intel/baytrail/acpi/xhci.asl index bfed3c6..d3706a4 100644 --- a/src/soc/intel/baytrail/acpi/xhci.asl +++ b/src/soc/intel/baytrail/acpi/xhci.asl @@ -18,11 +18,11 @@ // REV: Revision 0x02 for ACPI 5.0 CreateField (DerefOf (Index (PCKG, Zero)), Zero, 0x07, REV) - Store (0x02, REV) + REV = 0x02 // VISI: Port visibility to user per port CreateField (DerefOf (Index (PCKG, Zero)), 0x40, One, VISI) - Store (Arg0, VISI) + VISI = Arg0 Return (PCKG) } -- To view, visit
https://review.coreboot.org/c/coreboot/+/46236
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I0033698580439f90ac91570f1a4e73f9b235e53a Gerrit-Change-Number: 46236 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org> Gerrit-MessageType: newchange
[View Less]
1
2
0
0
Change in coreboot[master]: nb/intel/haswell: Use `chromeos_reserve_ram_oops` function
by Angel Pons (Code Review)
16 Feb '21
16 Feb '21
Angel Pons has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/46980
) Change subject: nb/intel/haswell: Use `chromeos_reserve_ram_oops` function ...................................................................... nb/intel/haswell: Use `chromeos_reserve_ram_oops` function Taken from Broadwell and assumed to be equivalent. Change-Id: Iffc2e3450e98182139dc5020b466186d0d28d20c Signed-off-by: Angel Pons <th3fanbus(a)gmail.com> --- M src/northbridge/intel/
…
[View More]
haswell/northbridge.c 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/80/46980/1 diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c index 2d19ccd..a6f187c 100644 --- a/src/northbridge/intel/haswell/northbridge.c +++ b/src/northbridge/intel/haswell/northbridge.c @@ -13,6 +13,7 @@ #include <device/pci_ops.h> #include <boot/tables.h> #include <security/intel/txt/txt_register.h> +#include <vendorcode/google/chromeos/chromeos.h> #include "chip.h" #include "haswell.h" @@ -373,11 +374,9 @@ mmio_resource(dev, index++, (0xa0000 >> 10), (0xc0000 - 0xa0000) >> 10); reserved_ram_resource(dev, index++, (0xc0000 >> 10), (0x100000 - 0xc0000) >> 10); -#if CONFIG(CHROMEOS_RAMOOPS) - reserved_ram_resource(dev, index++, - CONFIG_CHROMEOS_RAMOOPS_RAM_START >> 10, - CONFIG_CHROMEOS_RAMOOPS_RAM_SIZE >> 10); -#endif + if (CONFIG(CHROMEOS)) + chromeos_reserve_ram_oops(dev, index++); + *resource_cnt = index; } -- To view, visit
https://review.coreboot.org/c/coreboot/+/46980
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: Iffc2e3450e98182139dc5020b466186d0d28d20c Gerrit-Change-Number: 46980 Gerrit-PatchSet: 1 Gerrit-Owner: Angel Pons <th3fanbus(a)gmail.com> Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org> Gerrit-MessageType: newchange
[View Less]
1
1
0
0
Change in coreboot[master]: src/drivers/spi: Use common 'SPI_OPCODE_*'
by HAOUAS Elyes (Code Review)
15 Feb '21
15 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/45092
) Change subject: src/drivers/spi: Use common 'SPI_OPCODE_*' ...................................................................... src/drivers/spi: Use common 'SPI_OPCODE_*' Change-Id: Ie0ec13ba56c813ffc5a62c3013f32221061ae94d Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/drivers/spi/adesto.c M src/drivers/spi/amic.c M src/drivers/spi/atmel.c M src/drivers/spi/eon.c M src/
…
[View More]
drivers/spi/gigadevice.c M src/drivers/spi/macronix.c M src/drivers/spi/spansion.c M src/drivers/spi/sst.c M src/drivers/spi/stmicro.c M src/include/spi_flash.h 10 files changed, 20 insertions(+), 128 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/45092/1 diff --git a/src/drivers/spi/adesto.c b/src/drivers/spi/adesto.c index 6538905..9e786e0 100644 --- a/src/drivers/spi/adesto.c +++ b/src/drivers/spi/adesto.c @@ -12,20 +12,6 @@ #include "spi_flash_internal.h" -/* at25dfxx-specific commands */ -#define CMD_AT25DF_WREN 0x06 /* Write Enable */ -#define CMD_AT25DF_WRDI 0x04 /* Write Disable */ -#define CMD_AT25DF_RDSR 0x05 /* Read Status Register */ -#define CMD_AT25DF_WRSR 0x01 /* Write Status Register */ -#define CMD_AT25DF_READ 0x03 /* Read Data Bytes */ -#define CMD_AT25DF_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_AT25DF_PP 0x02 /* Page Program */ -#define CMD_AT25DF_SE 0x20 /* Sector (4K) Erase */ -#define CMD_AT25DF_BE 0xd8 /* Block (64K) Erase */ -#define CMD_AT25DF_CE 0xc7 /* Chip Erase */ -#define CMD_AT25DF_DP 0xb9 /* Deep Power-down */ -#define CMD_AT25DF_RES 0xab /* Release from DP, and Read Signature */ - static const struct spi_flash_part_id flash_table[] = { { /* AT25SL128A */ diff --git a/src/drivers/spi/amic.c b/src/drivers/spi/amic.c index 5e74616..9afa9fb 100644 --- a/src/drivers/spi/amic.c +++ b/src/drivers/spi/amic.c @@ -7,20 +7,6 @@ #include "spi_flash_internal.h" -/* A25L-specific commands */ -#define CMD_A25_WREN 0x06 /* Write Enable */ -#define CMD_A25_WRDI 0x04 /* Write Disable */ -#define CMD_A25_RDSR 0x05 /* Read Status Register */ -#define CMD_A25_WRSR 0x01 /* Write Status Register */ -#define CMD_A25_READ 0x03 /* Read Data Bytes */ -#define CMD_A25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_A25_PP 0x02 /* Page Program */ -#define CMD_A25_SE 0x20 /* Sector (4K) Erase */ -#define CMD_A25_BE 0xd8 /* Block (64K) Erase */ -#define CMD_A25_CE 0xc7 /* Chip Erase */ -#define CMD_A25_DP 0xb9 /* Deep Power-down */ -#define CMD_A25_RES 0xab /* Release from DP, and Read Signature */ - static const struct spi_flash_part_id flash_table[] = { { /* A25L16PU */ diff --git a/src/drivers/spi/atmel.c b/src/drivers/spi/atmel.c index 4dcc5b5..ab8b0fa 100644 --- a/src/drivers/spi/atmel.c +++ b/src/drivers/spi/atmel.c @@ -7,20 +7,6 @@ #include "spi_flash_internal.h" -/* M25Pxx-specific commands */ -#define CMD_AT25_WREN 0x06 /* Write Enable */ -#define CMD_AT25_WRDI 0x04 /* Write Disable */ -#define CMD_AT25_RDSR 0x05 /* Read Status Register */ -#define CMD_AT25_WRSR 0x01 /* Write Status Register */ -#define CMD_AT25_READ 0x03 /* Read Data Bytes */ -#define CMD_AT25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_AT25_PP 0x02 /* Page Program */ -#define CMD_AT25_SE 0x20 /* Sector (4K) Erase */ -#define CMD_AT25_BE 0xd8 /* Block (64K) Erase */ -#define CMD_AT25_CE 0xc7 /* Chip Erase */ -#define CMD_AT25_DP 0xb9 /* Deep Power-down */ -#define CMD_AT25_RES 0xab /* Release from DP, and Read Signature */ - static const struct spi_flash_part_id flash_table[] = { { /* AT25X16 */ diff --git a/src/drivers/spi/eon.c b/src/drivers/spi/eon.c index 1212c6b..f6ef3d0 100644 --- a/src/drivers/spi/eon.c +++ b/src/drivers/spi/eon.c @@ -7,19 +7,6 @@ #include "spi_flash_internal.h" -/* EN25*-specific commands */ -#define CMD_EN25_WREN 0x06 /* Write Enable */ -#define CMD_EN25_WRDI 0x04 /* Write Disable */ -#define CMD_EN25_RDSR 0x05 /* Read Status Register */ -#define CMD_EN25_WRSR 0x01 /* Write Status Register */ -#define CMD_EN25_READ 0x03 /* Read Data Bytes */ -#define CMD_EN25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_EN25_PP 0x02 /* Page Program */ -#define CMD_EN25_SE 0x20 /* Sector Erase */ -#define CMD_EN25_BE 0xd8 /* Block Erase */ -#define CMD_EN25_DP 0xb9 /* Deep Power-down */ -#define CMD_EN25_RES 0xab /* Release from DP, and Read Signature */ - #define EON_ID_EN25B80 0x2014 #define EON_ID_EN25B16 0x2015 #define EON_ID_EN25B32 0x2016 diff --git a/src/drivers/spi/gigadevice.c b/src/drivers/spi/gigadevice.c index 6c5a167..0d20758 100644 --- a/src/drivers/spi/gigadevice.c +++ b/src/drivers/spi/gigadevice.c @@ -7,20 +7,6 @@ #include "spi_flash_internal.h" -/* GD25Pxx-specific commands */ -#define CMD_GD25_WREN 0x06 /* Write Enable */ -#define CMD_GD25_WRDI 0x04 /* Write Disable */ -#define CMD_GD25_RDSR 0x05 /* Read Status Register */ -#define CMD_GD25_WRSR 0x01 /* Write Status Register */ -#define CMD_GD25_READ 0x03 /* Read Data Bytes */ -#define CMD_GD25_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_GD25_PP 0x02 /* Page Program */ -#define CMD_GD25_SE 0x20 /* Sector (4K) Erase */ -#define CMD_GD25_BE 0xd8 /* Block (64K) Erase */ -#define CMD_GD25_CE 0xc7 /* Chip Erase */ -#define CMD_GD25_DP 0xb9 /* Deep Power-down */ -#define CMD_GD25_RES 0xab /* Release from DP, and Read Signature */ - static const struct spi_flash_part_id flash_table[] = { { /* GD25T80 */ diff --git a/src/drivers/spi/macronix.c b/src/drivers/spi/macronix.c index f3f7e2d..f8f773a 100644 --- a/src/drivers/spi/macronix.c +++ b/src/drivers/spi/macronix.c @@ -7,20 +7,6 @@ #include "spi_flash_internal.h" -/* MX25xx-specific commands */ -#define CMD_MX25XX_WREN 0x06 /* Write Enable */ -#define CMD_MX25XX_WRDI 0x04 /* Write Disable */ -#define CMD_MX25XX_RDSR 0x05 /* Read Status Register */ -#define CMD_MX25XX_WRSR 0x01 /* Write Status Register */ -#define CMD_MX25XX_READ 0x03 /* Read Data Bytes */ -#define CMD_MX25XX_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_MX25XX_PP 0x02 /* Page Program */ -#define CMD_MX25XX_SE 0x20 /* Sector Erase */ -#define CMD_MX25XX_BE 0xD8 /* Block Erase */ -#define CMD_MX25XX_CE 0xc7 /* Chip Erase */ -#define CMD_MX25XX_DP 0xb9 /* Deep Power-down */ -#define CMD_MX25XX_RES 0xab /* Release from DP, and Read Signature */ - #define MACRONIX_SR_WIP (1 << 0) /* Write-in-Progress */ static const struct spi_flash_part_id flash_table[] = { diff --git a/src/drivers/spi/spansion.c b/src/drivers/spi/spansion.c index fe0e265..ff912bd 100644 --- a/src/drivers/spi/spansion.c +++ b/src/drivers/spi/spansion.c @@ -7,20 +7,6 @@ #include "spi_flash_internal.h" -/* S25FLxx-specific commands */ -#define CMD_S25FLXX_READ 0x03 /* Read Data Bytes */ -#define CMD_S25FLXX_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_S25FLXX_READID 0x90 /* Read Manufacture ID and Device ID */ -#define CMD_S25FLXX_WREN 0x06 /* Write Enable */ -#define CMD_S25FLXX_WRDI 0x04 /* Write Disable */ -#define CMD_S25FLXX_RDSR 0x05 /* Read Status Register */ -#define CMD_S25FLXX_WRSR 0x01 /* Write Status Register */ -#define CMD_S25FLXX_PP 0x02 /* Page Program */ -#define CMD_S25FLXX_SE 0xd8 /* Sector Erase */ -#define CMD_S25FLXX_BE 0xc7 /* Bulk Erase */ -#define CMD_S25FLXX_DP 0xb9 /* Deep Power-down */ -#define CMD_S25FLXX_RES 0xab /* Release from DP, and Read Signature */ - #define SPSN_ID_S25FL008A 0x0213 #define SPSN_ID_S25FL016A 0x0214 #define SPSN_ID_S25FL032A 0x0215 diff --git a/src/drivers/spi/sst.c b/src/drivers/spi/sst.c index 887380f..02e5129 100644 --- a/src/drivers/spi/sst.c +++ b/src/drivers/spi/sst.c @@ -11,15 +11,8 @@ #include "spi_flash_internal.h" -#define CMD_SST_WREN 0x06 /* Write Enable */ -#define CMD_SST_WRDI 0x04 /* Write Disable */ -#define CMD_SST_RDSR 0x05 /* Read Status Register */ -#define CMD_SST_WRSR 0x01 /* Write Status Register */ #define CMD_SST_EWSR 0x50 /* Enable Write Status Register */ -#define CMD_SST_READ 0x03 /* Read Data Bytes */ -#define CMD_SST_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ #define CMD_SST_BP 0x02 /* Byte Program */ -#define CMD_SST_PP 0x02 /* Page Program */ #define CMD_SST_AAI_WP 0xAD /* Auto Address Increment Word Program */ #define CMD_SST_SE 0x20 /* Sector Erase */ @@ -90,7 +83,7 @@ static int sst_enable_writing(const struct spi_flash *flash) { - int ret = spi_flash_cmd(&flash->spi, CMD_SST_WREN, NULL, 0); + int ret = spi_flash_cmd(&flash->spi, SPI_OPCODE_WREN, NULL, 0); if (ret) printk(BIOS_WARNING, "SF: Enabling Write failed\n"); return ret; @@ -108,7 +101,7 @@ static int sst_disable_writing(const struct spi_flash *flash) { - int ret = spi_flash_cmd(&flash->spi, CMD_SST_WRDI, NULL, 0); + int ret = spi_flash_cmd(&flash->spi, SPI_OPCODE_WRDI, NULL, 0); if (ret) printk(BIOS_WARNING, "SF: Disabling Write failed\n"); return ret; @@ -127,7 +120,7 @@ #if CONFIG(DEBUG_SPI_FLASH) printk(BIOS_SPEW, "BP[%02x]: %p => cmd = { 0x%02x 0x%06x }\n", - spi_w8r8(&flash->spi, CMD_SST_RDSR), buf, cmd[0], offset); + spi_w8r8(&flash->spi, SPI_OPCODE_RDSR), buf, cmd[0], offset); #endif ret = sst_enable_writing(flash); @@ -170,7 +163,7 @@ for (; actual < len - 1; actual += 2) { #if CONFIG(DEBUG_SPI_FLASH) printk(BIOS_SPEW, "WP[%02x]: %p => cmd = { 0x%02x 0x%06x }\n", - spi_w8r8(&flash->spi, CMD_SST_RDSR), buf + actual, cmd[0], + spi_w8r8(&flash->spi, SPI_OPCODE_RDSR), buf + actual, cmd[0], offset); #endif @@ -215,21 +208,21 @@ if (ret) return ret; - cmd = CMD_SST_WRSR; + cmd = SPI_OPCODE_WRSR; status = 0; ret = spi_flash_cmd_write(&flash->spi, &cmd, 1, &status, 1); if (ret) printk(BIOS_WARNING, "SF: Unable to set status byte\n"); - printk(BIOS_INFO, "SF: SST: status = %x\n", spi_w8r8(&flash->spi, CMD_SST_RDSR)); + printk(BIOS_INFO, "SF: SST: status = %x\n", spi_w8r8(&flash->spi, SPI_OPCODE_RDSR)); return ret; } static const struct spi_flash_ops_descriptor descai = { .erase_cmd = CMD_SST_SE, - .status_cmd = CMD_SST_RDSR, - .wren_cmd = CMD_SST_WREN, + .status_cmd = SPI_OPCODE_RDSR, + .wren_cmd = SPI_OPCODE_WREN, .ops = { .read = spi_flash_cmd_read, .write = sst_write_ai, diff --git a/src/drivers/spi/stmicro.c b/src/drivers/spi/stmicro.c index 4cd8c1b..63b6451 100644 --- a/src/drivers/spi/stmicro.c +++ b/src/drivers/spi/stmicro.c @@ -7,20 +7,6 @@ #include "spi_flash_internal.h" -/* M25Pxx-specific commands */ -#define CMD_M25PXX_WREN 0x06 /* Write Enable */ -#define CMD_M25PXX_WRDI 0x04 /* Write Disable */ -#define CMD_M25PXX_RDSR 0x05 /* Read Status Register */ -#define CMD_M25PXX_WRSR 0x01 /* Write Status Register */ -#define CMD_M25PXX_READ 0x03 /* Read Data Bytes */ -#define CMD_M25PXX_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ -#define CMD_M25PXX_PP 0x02 /* Page Program */ -#define CMD_M25PXX_SSE 0x20 /* Subsector Erase */ -#define CMD_M25PXX_SE 0xd8 /* Sector Erase */ -#define CMD_M25PXX_BE 0xc7 /* Bulk Erase */ -#define CMD_M25PXX_DP 0xb9 /* Deep Power-down */ -#define CMD_M25PXX_RES 0xab /* Release from DP, and Read Signature */ - /* * Device ID = (memory_type << 8) + memory_capacity */ diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h index 1061e99..d5ba116 100644 --- a/src/include/spi_flash.h +++ b/src/include/spi_flash.h @@ -9,8 +9,18 @@ #include <boot/coreboot_tables.h> /* SPI Flash opcodes */ -#define SPI_OPCODE_WREN 0x06 -#define SPI_OPCODE_FAST_READ 0x0b +#define SPI_OPCODE_WREN 0x06 /* Write Enable */ +#define SPI_OPCODE_WRDI 0x04 /* Write Disable */ +#define SPI_OPCODE_RDSR 0x05 /* Read Status Register */ +#define SPI_OPCODE_WRSR 0x01 /* Write Status Register */ +#define SPI_OPCODE_READ 0x03 /* Read Data Bytes */ +#define SPI_OPCODE_FAST_READ 0x0b /* Read Data Bytes at Higher Speed */ +#define SPI_OPCODE_PP 0x02 /* Page Program */ +#define SPI_OPCODE_SE 0x20 /* Sector (4K) Erase */ +#define SPI_OPCODE_BE 0xd8 /* Block (64K) Erase */ +#define SPI_OPCODE_CE 0xc7 /* Chip Erase */ +#define SPI_OPCODE_DP 0xb9 /* Deep Power-down */ +#define SPI_OPCODE_RES 0xab /* Release from DP, and Read Signature */ struct spi_flash; -- To view, visit
https://review.coreboot.org/c/coreboot/+/45092
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: Ie0ec13ba56c813ffc5a62c3013f32221061ae94d Gerrit-Change-Number: 45092 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-MessageType: newchange
[View Less]
1
4
0
0
Change in coreboot[master]: mb/intel/cedarisland_crb: Convert to ASL 2.0 syntax
by HAOUAS Elyes (Code Review)
14 Feb '21
14 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/46183
) Change subject: mb/intel/cedarisland_crb: Convert to ASL 2.0 syntax ...................................................................... mb/intel/cedarisland_crb: Convert to ASL 2.0 syntax Change-Id: Idb9b6d1b4abd310a47f009e35756d56577a83c4e Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/mainboard/intel/cedarisland_crb/acpi/platform.asl 1 file changed, 1 insertion(+), 1
…
[View More]
deletion(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/46183/1 diff --git a/src/mainboard/intel/cedarisland_crb/acpi/platform.asl b/src/mainboard/intel/cedarisland_crb/acpi/platform.asl index 9649592..ebde468 100644 --- a/src/mainboard/intel/cedarisland_crb/acpi/platform.asl +++ b/src/mainboard/intel/cedarisland_crb/acpi/platform.asl @@ -23,7 +23,7 @@ Method(_PIC, 1) { - Store(Arg0, PICM) + PICM = Arg0 } /* -- To view, visit
https://review.coreboot.org/c/coreboot/+/46183
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: Idb9b6d1b4abd310a47f009e35756d56577a83c4e Gerrit-Change-Number: 46183 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-MessageType: newchange
[View Less]
1
2
0
0
Change in coreboot[master]: mb/51nb/x210/acpi: Convert to to ASL 2.0 syntax
by HAOUAS Elyes (Code Review)
14 Feb '21
14 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/45772
) Change subject: mb/51nb/x210/acpi: Convert to to ASL 2.0 syntax ...................................................................... mb/51nb/x210/acpi: Convert to to ASL 2.0 syntax Generated build/dsdt.dsl before and after current patch are same. Change-Id: Ia0354e535229e832cf0e65cb8744a1ee8d5e8a34 Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/mainboard/51nb/x210/acpi/
…
[View More]
battery.asl M src/mainboard/51nb/x210/acpi/ec.asl M src/mainboard/51nb/x210/acpi/platform.asl 3 files changed, 15 insertions(+), 15 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/45772/1 diff --git a/src/mainboard/51nb/x210/acpi/battery.asl b/src/mainboard/51nb/x210/acpi/battery.asl index f9022a4..b81af1f 100644 --- a/src/mainboard/51nb/x210/acpi/battery.asl +++ b/src/mainboard/51nb/x210/acpi/battery.asl @@ -37,19 +37,19 @@ Method (_BIF, 0, Serialized) { /* Design Capacity */ - Store (DGCP * 10000 / DGVO, Index (PBIF, 1)) + PBIF [One] = (DGCP * 10000) / DGVO /* Last Full Charge Capacity */ - Store (FLCP * 10000 / DGVO, Index (PBIF, 2)) + PBIF [2] = (FLCP * 10000) / DGVO /* Design Voltage */ - Store (DGVO, Index (PBIF, 4)) + PBIF [4] = DGVO /* Design Capacity of Warning */ - Store (BDW * 10000 / DGVO, Index (PBIF, 5)) + PBIF [5] = (BDW * 10000) / DGVO /* Design Capacity of Low */ - Store (BDL, Index (PBIF, 6)) + PBIF [6] = BDL Return (PBIF) } @@ -70,22 +70,22 @@ * bit 1 = charging * bit 2 = critical level */ - Store (BSTS, Index (PBST, 0)) + PBST [0] = BSTS /* * 1: BATTERY PRESENT RATE */ - Store (BPR, Index (PBST, 1)) + PBST [1] = BPR /* * 2: BATTERY REMAINING CAPACITY */ - Store (BRC * 10000 / DGVO, Index (PBST, 2)) + PBST [2] = (BRC * 10000) / DGVO /* * 3: BATTERY PRESENT VOLTAGE */ - Store (BPV, Index (PBST, 3)) + PBST [3] = BPV Return (PBST) } diff --git a/src/mainboard/51nb/x210/acpi/ec.asl b/src/mainboard/51nb/x210/acpi/ec.asl index 78e156c..fc1aafc 100644 --- a/src/mainboard/51nb/x210/acpi/ec.asl +++ b/src/mainboard/51nb/x210/acpi/ec.asl @@ -45,10 +45,10 @@ Method (_REG, 2, NotSerialized) { /* Initialize AC power state */ - Store (ACIN, \PWRS) + PWRS = ACIN /* Initialize LID switch state */ - Store (LIDC, \LIDS) + LIDS = LIDC } /* KEY_BRIGHTNESSUP */ @@ -79,7 +79,7 @@ /* Lid event */ Method (_Q0E) { - Store (LIDC, \LIDS) + LIDS = LIDC Notify (LID0, 0x80) } diff --git a/src/mainboard/51nb/x210/acpi/platform.asl b/src/mainboard/51nb/x210/acpi/platform.asl index 6cf3f32..3415767 100644 --- a/src/mainboard/51nb/x210/acpi/platform.asl +++ b/src/mainboard/51nb/x210/acpi/platform.asl @@ -14,7 +14,7 @@ Method (_PIC, 1) { /* Remember the OS' IRQ routing choice. */ - Store (Arg0, PICM) + PICM = Arg0 } /* @@ -30,7 +30,7 @@ Method (_WAK, 1) { - Store(\_SB.PCI0.LPCB.EC.LIDC, \LIDS) - Store(\_SB.PCI0.LPCB.EC.ACIN, \PWRS) + LIDS = \_SB.PCI0.LPCB.EC.LIDC + PWRS = \_SB.PCI0.LPCB.EC.ACIN Return (Package (){ 0, 0 }) } -- To view, visit
https://review.coreboot.org/c/coreboot/+/45772
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: Ia0354e535229e832cf0e65cb8744a1ee8d5e8a34 Gerrit-Change-Number: 45772 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-MessageType: newchange
[View Less]
1
2
0
0
Change in coreboot[master]: ec/quanta/ene_kb3940q: Convert to ASL 2.0 syntax
by HAOUAS Elyes (Code Review)
14 Feb '21
14 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/46103
) Change subject: ec/quanta/ene_kb3940q: Convert to ASL 2.0 syntax ...................................................................... ec/quanta/ene_kb3940q: Convert to ASL 2.0 syntax Change-Id: Ifc90fb7707c07f2f364e1fdd710fe52522e8ab5e Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/ec/quanta/ene_kb3940q/acpi/ac.asl M src/ec/quanta/ene_kb3940q/acpi/battery.asl M src/ec/
…
[View More]
quanta/ene_kb3940q/acpi/ec.asl 3 files changed, 60 insertions(+), 61 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/46103/1 diff --git a/src/ec/quanta/ene_kb3940q/acpi/ac.asl b/src/ec/quanta/ene_kb3940q/acpi/ac.asl index b086bf5..cc14b33 100644 --- a/src/ec/quanta/ene_kb3940q/acpi/ac.asl +++ b/src/ec/quanta/ene_kb3940q/acpi/ac.asl @@ -9,7 +9,7 @@ Method (_PSR) { - Store(ADPT, Local0) + Local0 = ADPT Return(Local0) } diff --git a/src/ec/quanta/ene_kb3940q/acpi/battery.asl b/src/ec/quanta/ene_kb3940q/acpi/battery.asl index 09c1b29..b5a7db7 100644 --- a/src/ec/quanta/ene_kb3940q/acpi/battery.asl +++ b/src/ec/quanta/ene_kb3940q/acpi/battery.asl @@ -44,13 +44,13 @@ // Method to enable full battery workaround Method (BFWE) { - Store (One, BFWK) + BFWK = 1 } // Method to disable full battery workaround Method (BFWD) { - Store (Zero, BFWK) + BFWK = 0 } // Device insertion/removal control method that returns a device's status. @@ -68,18 +68,18 @@ Method (_BIF, 0, Serialized) { // Update fields from EC - Store (BDC0, Index (PBIF, 1)) // Batt Design Capacity - Store (BFC0, Index (PBIF, 2)) // Batt Last Full Charge Capacity - Store (BDV0, Index (PBIF, 4)) // Batt Design Voltage - Divide(BFC0, 0x64, , Local1) - Multiply(Local1, 0x0A, Local0) - Store(Local0, Index(PBIF, 5)) - Multiply(Local1, 0x05, Local0) - Store (Local0, Index (PBIF, 6)) - Store (ToString(Concatenate(BATD, 0x00)), Index (PBIF, 9)) // Model Number - Store (ToDecimalString(BSN0), Index (PBIF, 10)) // Serial Number - Store (ToString(Concatenate(BCHM, 0x00)), Index (PBIF, 11)) // Battery Type - Store (\BATV, Index (PBIF, 12)) // OEM information + PBIF [1] = BDC0 // Batt Design Capacity + PBIF [2] = BFC0 // Batt Last Full Charge Capacity + PBIF [4] = BDV0 // Batt Design Voltage + Local1 = BFC0 / 100 + Local0 *= 10 + PBIF [5] = Local0 + Local0 = Local1 * 5 + PBIF [6] = Local0 + PBIF [9] = ToString (Concatenate (BATD, 0x00)) // Model Number + PBIF [10] = ToDecimalString(BSN0) // Serial Number + PBIF [11] = ToString (Concatenate (BCHM, 0x00)) // Battery Type + PBIF [12] = \BATV // OEM information Return (PBIF) } @@ -95,45 +95,44 @@ // // Get battery state from EC - Store (BST0, Local0) - Store (Local0, Index (PBST, 0)) + Local0 = BST0 + PBST [0] = Local0 // // 1: BATTERY PRESENT RATE/CURRENT // - Store (BPC0, Local1) - If (LAnd (Local1, 0x8000)) { - Xor (Local1, 0xFFFF, Local1) - Increment (Local1) + Local1 = BPC0 + If (Local1 && 0x8000) { + Local1 ^= 0xFFFF + Local1++ } - Store (Local1, Index (PBST, 1)) + PBST [1] = Local1 // // 2: BATTERY REMAINING CAPACITY // Store (BRC0, Local1) - If (LAnd (BFWK, LAnd (ADPT, LNot (Local0)))) { + If (BFWK && ADPT && !Local0) { // On AC power and battery is neither charging // nor discharging. Linux expects a full battery // to report same capacity as last full charge. //
https://bugzilla.kernel.org/show_bug.cgi?id=12632
- Store (BFC0, Local2) + Local2 = BFC0 // See if within ~3% of full - ShiftRight (Local2, 5, Local3) - If (LAnd (LGreater (Local1, Subtract (Local2, Local3)), - LLess (Local1, Add (Local2, Local3)))) + Local3 = Local2 >> 5 + If ((Local1 > (Local2 - Local3)) && (Local1 < (Local2 + Local3))) { - Store (Local2, Local1) + Local1 = Local2 } } - Store (Local1, Index (PBST, 2)) + PBST [2] = Local1 // // 3: BATTERY PRESENT VOLTAGE // - Store (BPV0, Index (PBST, 3)) + PBST [3] = BPV0 Return (PBST) } diff --git a/src/ec/quanta/ene_kb3940q/acpi/ec.asl b/src/ec/quanta/ene_kb3940q/acpi/ec.asl index 9d8cc28..d43ec27 100644 --- a/src/ec/quanta/ene_kb3940q/acpi/ec.asl +++ b/src/ec/quanta/ene_kb3940q/acpi/ec.asl @@ -122,26 +122,26 @@ Method (_REG, 2, NotSerialized) { // Initialize AC power state - Store (ADPT, \PWRS) + \PWRS = ADPT // Initialize LID switch state - Store (LIDF, \LIDS) + \LIDS = LIDF // Force a read of CPU temperature - Store (CTMP, Local0) + Local0 = CTMP // Use Local0 to avoid iasl warning: Method Local is set but never used - And(Local0, Ones, Local0) + Local0 &= Ones // Find and program number of P-States - Store (SizeOf (\_SB.CP00._PSS), MPST) - Store ("Programming number of P-states: ", Debug) - Store (MPST, Debug) + MPST = SizeOf (\_SB.CP00._PSS) + Debug = "Programming number of P-states: " + Debug = MPST // Find and program the current P-State - Store(\_SB.CP00._PPC, NPST) - Store ("Programming Current P-state: ", Debug) - Store (NPST, Debug) + NPST = \_SB.CP00._PPC + Debug = "Programming Current P-state: " + Debug = NPST } /* @@ -163,51 +163,51 @@ // Wifi Button Event Method (_Q07) { - Store ("Wifi Button Event 0x07", Debug) + Debug = "Wifi Button Event 0x07" } // Thermal Event Method (_Q08) { - Store ("Thermal Event 0x08", Debug) + Debug = "Thermal Event 0x08" Notify(\_TZ.THRM, 0x80) } // Pstate Down Method (_Q0E) { - Store ("Pstate Event 0x0E", Debug) + Debug = "Pstate Event 0x0E" - Store(\_SB.CP00._PPC, Local0) - Subtract(PPCM, 0x01, Local1) + Local0 = \_SB.CP00._PPC + Local1 = PPCM - 1 - If(LLess(Local0, Local1)) { - Increment(Local0) + If (Local0 < Local1) { + Local0++ \PPCN () } - Store(Local0, NPST) + NPST = Local0 } // Pstate Up Method (_Q0F) { - Store ("Pstate Event 0x0F", Debug) - Store(\_SB.CP00._PPC, Local0) + Debug = "Pstate Event 0x0F" + Local0 = \_SB.CP00._PPC If(Local0) { - Decrement(Local0) + Local0-- \PPCN () } - Store(Local0, NPST) + NPST = Local0 } // AC Power Connected Method (_Q10, 0, NotSerialized) { - Store ("AC Insertion Event 0x10", Debug) - Store (One, \PWRS) + Debug = "AC Insertion Event 0x10" + \PWRS = 1 Notify (AC, 0x80) Notify (BATX, 0x80) \PNOT () @@ -216,8 +216,8 @@ // AC Power Removed Method (_Q11, 0, NotSerialized) { - Store ("AC Detach Event 0x11", Debug) - Store (Zero, \PWRS) + Debug = "AC Detach Event 0x11" + \PWRS = 0 Notify (AC, 0x80) Notify (BATX, 0x80) \PNOT () @@ -226,7 +226,7 @@ // Battery State Change - Attach Event Method (_Q12, 0, NotSerialized) { - Store ("Battery Insertion Event 0x12", Debug) + Debug = "Battery Insertion Event 0x12" Notify (BATX, 0x81) Notify (BATX, 0x80) @@ -236,7 +236,7 @@ // Battery State Change - Detach Event Method (_Q13, 0, NotSerialized) { - Store ("Battery Detach Event 0x13", Debug) + Debug = "Battery Detach Event 0x13" Notify (BATX, 0x81) Notify (BATX, 0x80) @@ -247,7 +247,7 @@ // Battery State Change Event Method (_Q14, 0, NotSerialized) { - Store ("Battery State Change Event 0x14", Debug) + Debug = "Battery State Change Event 0x14" Notify (BATX, 0x80) } @@ -255,9 +255,9 @@ // Lid Switch Event Method (_Q06) { - Store ("Lid Switch Event 0x06", Debug) + Debug = "Lid Switch Event 0x06" sleep(20) - Store (LIDF, \LIDS) + \LIDS = LIDF Notify (\_SB.LID0, 0x80) } -- To view, visit
https://review.coreboot.org/c/coreboot/+/46103
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: Ifc90fb7707c07f2f364e1fdd710fe52522e8ab5e Gerrit-Change-Number: 46103 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-MessageType: newchange
[View Less]
1
2
0
0
Change in coreboot[master]: ec/lenovo/h8: Convert to ASL 2.0 syntax
by HAOUAS Elyes (Code Review)
14 Feb '21
14 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/46101
) Change subject: ec/lenovo/h8: Convert to ASL 2.0 syntax ...................................................................... ec/lenovo/h8: Convert to ASL 2.0 syntax Change-Id: I87bab2b11ba5e1fb585d5c88cf831b36e257c148 Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/ec/lenovo/h8/acpi/ac.asl M src/ec/lenovo/h8/acpi/battery.asl M src/ec/lenovo/h8/acpi/beep.asl M src/ec/lenovo/
…
[View More]
h8/acpi/ec.asl M src/ec/lenovo/h8/acpi/lid.asl M src/ec/lenovo/h8/acpi/sleepbutton.asl M src/ec/lenovo/h8/acpi/systemstatus.asl M src/ec/lenovo/h8/acpi/thermal.asl M src/ec/lenovo/h8/acpi/thinkpad.asl 9 files changed, 142 insertions(+), 140 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/01/46101/1 diff --git a/src/ec/lenovo/h8/acpi/ac.asl b/src/ec/lenovo/h8/acpi/ac.asl index ec7b7fc..436fdcf 100644 --- a/src/ec/lenovo/h8/acpi/ac.asl +++ b/src/ec/lenovo/h8/acpi/ac.asl @@ -15,8 +15,8 @@ Method(_PSR, 0, NotSerialized) { - Store(HPAC, Local0) - Store(Local0, \PWRS) + Local0 = HPAC + \PWRS = Local0 \PNOT() return (Local0) } diff --git a/src/ec/lenovo/h8/acpi/battery.asl b/src/ec/lenovo/h8/acpi/battery.asl index 42b91b9..a43ffce 100644 --- a/src/ec/lenovo/h8/acpi/battery.asl +++ b/src/ec/lenovo/h8/acpi/battery.asl @@ -94,32 +94,32 @@ Method(BSTA, 4, NotSerialized) { Acquire(ECLK, 0xffff) - Store(0, Local0) - ^BPAG(Or(1, Arg0)) - Store(BAMA, Local1) + Local0 = 0 + ^BPAG(1 | Arg0) + Local1 = BAMA ^BPAG(Arg0) /* Battery dynamic information */ /* * Present rate is a 16bit signed int, positive while charging * and negative while discharging. */ - Store(BAPR, Local2) + Local2 = BAPR If (Arg2) // Charging { - Or(2, Local0, Local0) + Local0 |= 2 } Else { If (Arg3) // Discharging { - Or(1, Local0, Local0) + Local0 |= 1 // Negate present rate - Subtract(0x10000, Local2, Local2) + Local2 = 0x10000 - Local2 } Else // Full battery, force to 0 { - Store(0, Local2) + Local2 = 0 } } @@ -127,21 +127,21 @@ * The present rate value must be positive now, if it is not we have an * EC bug or inconsistency and force the value to 0. */ - If (LGreaterEqual (Local2, 0x8000)) { - Store(0, Local2) + If (Local2 >= 0x8000) { + Local2 = 0 } - Store(Local0, Index(Arg1, 0x00)) + Arg1 [0] = Local0 if (Local1) { - Multiply (BARC, 10, Index(Arg1, 2)) - Multiply (Local2, BAVO, Local2) - Divide (Local2, 1000, , Index(Arg1, 1)) + Arg1 [2] = BARC * 10 + Local2 *= BAVO + Arg1 [1] = Local2 / 1000 } else { - Store(BARC, Index(Arg1, 2)) - Store(Local2, Index(Arg1, 1)) + Arg1 [2] = BARC + Arg1 [1] = Local2 } - Store(BAVO, Index(Arg1, 3)) + Arg1 [3] = BAVO Release(ECLK) Return (Arg1) } @@ -149,44 +149,46 @@ Method(BINF, 2, Serialized) { Acquire(ECLK, 0xffff) - ^BPAG(Or(1, Arg1)) /* Battery 0 static information */ - Xor(BAMA, 1, Index(Arg0, 0)) - Store(BAMA, Local0) + ^BPAG(1 | Arg1) /* Battery 0 static information */ + Arg0 [0] = BAMA ^ 1 + Local0 = BAMA ^BPAG(Arg1) - Store(BAFC, Local2) - ^BPAG(Or(2, Arg1)) - Store(BADC, Local1) + Local2 = BAFC + ^BPAG(2 | Arg1) + Local1 = BADC if (Local0) { - Multiply (Local1, 10, Local1) - Multiply (Local2, 10, Local2) + Local1 *= 10 + Local2 *= 10 } - Store(Local1, Index(Arg0, 1)) // Design Capacity - Store(Local2, Index(Arg0, 2)) // Last full charge capacity - Store(BADV, Index(Arg0, 4)) // Design Voltage - Divide (Local2, 20, Local0, Index(Arg0, 5)) // Warning capacity + Arg0 [1] = Local1 // Design Capacity + Arg0 [2] = Local2 // Last full charge capacity + Arg0 [4] = BADV // Design Voltage + Local0 = Local2 % 20 /* FIXME: Local0 not used */ + Arg0 [5] = Local2 / 20 // Warning capacity - Store (BASN, Local0) + Local0 = BASN Name (SERN, Buffer (0x06) { " " }) - Store (4, Local1) + Local1 = 4 While (Local0) { - Divide (Local0, 0x0A, Local2, Local0) - Add (Local2, 48, Index (SERN, Local1)) - Decrement (Local1) + Local2 = Local0 % 10 + Local0 /= 10 + SERN [Local1] = Local2 + 48 + Local1-- } - Store (SERN, Index (Arg0, 10)) // Serial Number + Arg0 [10] = SERN // Serial Number ^BPAG(Or(4, Arg1)) Name (TYPE, Buffer() { 0, 0, 0, 0, 0 }) - Store(BATY, TYPE) - Store(TYPE, Index (Arg0, 11)) // Battery type - ^BPAG(Or(5, Arg1)) - Store(BAOE, Index (Arg0, 12)) // OEM information - ^BPAG(Or(6, Arg1)) - Store(BANA, Index (Arg0, 9)) // Model number + TYPE = BATY + Arg0 [11] = TYPE // Battery type + ^BPAG(5 | Arg1) + Arg0 [12] = BAOE // OEM information + ^BPAG(6 | Arg1) + Arg0 [9] = BANA // Model number Release(ECLK) Return (Arg0) } diff --git a/src/ec/lenovo/h8/acpi/beep.asl b/src/ec/lenovo/h8/acpi/beep.asl index 214c8a9..3e51938 100644 --- a/src/ec/lenovo/h8/acpi/beep.asl +++ b/src/ec/lenovo/h8/acpi/beep.asl @@ -9,5 +9,5 @@ Method(BEEP, 1, NotSerialized) { - Store (Arg0, SNDS) + SNDS = Arg0 } diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl index 18463a5..0c77327 100644 --- a/src/ec/lenovo/h8/acpi/ec.asl +++ b/src/ec/lenovo/h8/acpi/ec.asl @@ -64,12 +64,12 @@ Method (_REG, 2, NotSerialized) { /* Wait for ERAM driver loaded */ - if (LEqual(Arg1, One)) { + if (Arg1 == 1) { /* Fill HKEY defaults on first boot */ - if (LEqual(^HKEY.INIT, Zero)) { - Store (BTEB, ^HKEY.WBDC) - Store (WWEB, ^HKEY.WWAN) - Store (One, ^HKEY.INIT) + if (^HKEY.INIT == 0) { + ^HKEY.WBDC = BTEB + ^HKEY.WWAN = WWEB + ^HKEY.INIT = 1 } } } @@ -86,13 +86,13 @@ Method (TLED, 1, NotSerialized) { - Store(Arg0, LEDS) + LEDS = Arg0 } /* Not used for coreboot. Provided for compatibility with thinkpad-acpi. */ Method (LED, 2, NotSerialized) { - TLED(Or(Arg0, Arg1)) + TLED (Arg0 | Arg1) } Method (_INI, 0, NotSerialized) @@ -101,24 +101,24 @@ Method (MUTE, 1, NotSerialized) { - Store(Arg0, AMUT) + AMUT = Arg0 } Method (RADI, 1, NotSerialized) { - Store(Arg0, WLEB) - Store(Arg0, WWEB) - Store(Arg0, BTEB) + WLEB = Arg0 + WWEB = Arg0 + BTEB = Arg0 } Method (USBP, 1, NotSerialized) { - Store(Arg0, USPW) + USPW = Arg0 } Method (LGHT, 1, NotSerialized) { - Store(Arg0, KBLT) + KBLT = Arg0 } @@ -157,7 +157,7 @@ Method(_Q27, 0, NotSerialized) { Notify (AC, 0x80) - Store(0x50, EVNT) + EVNT = 0x50 \PNOT() } @@ -318,11 +318,11 @@ Method (FANE, 1, Serialized) { If (Arg0) { - Store (One, FAND) - Store (Zero, FANA) + FAND = 1 + FANA = 0 } Else { - Store (Zero, FAND) - Store (One, FANA) + FAND = 0 + FANA = 1 } } diff --git a/src/ec/lenovo/h8/acpi/lid.asl b/src/ec/lenovo/h8/acpi/lid.asl index 8b74ecd..7695e4e 100644 --- a/src/ec/lenovo/h8/acpi/lid.asl +++ b/src/ec/lenovo/h8/acpi/lid.asl @@ -27,9 +27,9 @@ Method(_PSW, 1, NotSerialized) { if (Arg0) { - Store(1, WKLD) + WKLD = 1 } else { - Store(0, WKLD) + WKLD = 0 } } } diff --git a/src/ec/lenovo/h8/acpi/sleepbutton.asl b/src/ec/lenovo/h8/acpi/sleepbutton.asl index d3d6c9c..441dc65 100644 --- a/src/ec/lenovo/h8/acpi/sleepbutton.asl +++ b/src/ec/lenovo/h8/acpi/sleepbutton.asl @@ -20,11 +20,11 @@ Method(_PSW, 1, NotSerialized) { if (Arg0) { - Store(6, FNKY) /* Fn key acts as wake button */ - Store(1, WKFN) + FNKY = 6 /* Fn key acts as wake button */ + WKFN = 1 } else { - Store(0, FNKY) /* Fn key normal operation */ - Store(0, WKFN) + FNKY = 0 /* Fn key normal operation */ + WKFN = 0 } } } diff --git a/src/ec/lenovo/h8/acpi/systemstatus.asl b/src/ec/lenovo/h8/acpi/systemstatus.asl index a5793be..7598154 100644 --- a/src/ec/lenovo/h8/acpi/systemstatus.asl +++ b/src/ec/lenovo/h8/acpi/systemstatus.asl @@ -5,7 +5,7 @@ { Method(_SST, 1, NotSerialized) { - If (LEqual (Arg0, 0)) { + If (Arg0 == 0) { /* Indicator off */ /* power TLED off */ @@ -14,7 +14,7 @@ \_SB.PCI0.LPCB.EC.TLED(0x07) } - If (LEqual (Arg0, 1)) { + If (Arg0 == 1) { /* working state */ /* power TLED on */ @@ -23,7 +23,7 @@ \_SB.PCI0.LPCB.EC.TLED(0x07) } - If (LEqual (Arg0, 2)) { + If (Arg0 == 2) { /* waking state */ /* power LED on */ @@ -32,7 +32,7 @@ \_SB.PCI0.LPCB.EC.TLED(0xc7) } - If (LEqual (Arg0, 3)) { + If (Arg0 == 3) { /* sleep state */ /* power TLED pulsing */ diff --git a/src/ec/lenovo/h8/acpi/thermal.asl b/src/ec/lenovo/h8/acpi/thermal.asl index fe2d287..b72df1e 100644 --- a/src/ec/lenovo/h8/acpi/thermal.asl +++ b/src/ec/lenovo/h8/acpi/thermal.asl @@ -11,13 +11,13 @@ Method(C2K, 1, NotSerialized) { - Multiply(Arg0, 10, Local0) - Add (Local0, 2732, Local0) - if (LLessEqual(Local0, 2732)) { + Local0 = Arg0 * 10 + Local0 += 2732 + if (Local0 < 2732) { Return (3000) } - if (LGreater(Local0, 4012)) { + if (Local0 > 4012) { Return (3000) } Return (Local0) @@ -46,8 +46,8 @@ /* Get critical temperature in degree celsius */ Method (GCRT, 0, NotSerialized) { - Store (\TCRT, Local0) - if (LGreater (Local0, 0)) { + Local0 = \TCRT + if (Local0 > 0) { Return (Local0) } Return (127) @@ -55,8 +55,8 @@ /* Get passive temperature in degree celsius */ Method (GPSV, 0, NotSerialized) { - Store (\TPSV, Local0) - if (LGreater (Local0, 0)) { + Local0 = \TPSV + if (Local0 > 0) { Return (Local0) } Return (95) @@ -73,23 +73,23 @@ Method(_TMP) { #if defined(EC_LENOVO_H8_ME_WORKAROUND) /* Avoid tripping alarm if ME isn't booted at all yet */ - If (LAnd (LNot (MEB1), LEqual (\_SB.PCI0.LPCB.EC.TMP0, 128))) { + If (!MEB1 && (\_SB.PCI0.LPCB.EC.TMP0 == 128)) { Return (C2K(40)) } - Store (1, MEB1) + MEB1 = 1 #endif Return (C2K(\_SB.PCI0.LPCB.EC.TMP0)) } Method (_AC0) { - Store (GPSV (), Local0) + Local0 = GPSV () /* Active fan 10 degree below passive threshold */ - Subtract (Local0, 10, Local0) + Local0 -= 10 If (\FLVL) { /* Turn of 5 degree below trip point */ - Subtract (Local0, 5, Local0) + Local0 -= 5 } Return (C2K (Local0)) @@ -113,13 +113,13 @@ */ Method (_ON) { \_SB.PCI0.LPCB.EC.FANE(One) - Store (One, \FLVL) + \FLVL = 1 Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG) } Method (_OFF) { \_SB.PCI0.LPCB.EC.FANE(Zero) - Store (Zero, \FLVL) + \FLVL = 0 Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG) } } @@ -160,10 +160,10 @@ Method(_TMP) { #if defined(EC_LENOVO_H8_ME_WORKAROUND) /* Avoid tripping alarm if ME isn't booted at all yet */ - If (LAnd (LNot (MEB2), LEqual (\_SB.PCI0.LPCB.EC.TMP1, 128))) { + If (!MEB2 && (\_SB.PCI0.LPCB.EC.TMP1 == 128)) { Return (C2K(40)) } - Store (1, MEB2) + MEB2 = 1 #endif Return (C2K(\_SB.PCI0.LPCB.EC.TMP1)) } diff --git a/src/ec/lenovo/h8/acpi/thinkpad.asl b/src/ec/lenovo/h8/acpi/thinkpad.asl index eca0d44..944a301 100644 --- a/src/ec/lenovo/h8/acpi/thinkpad.asl +++ b/src/ec/lenovo/h8/acpi/thinkpad.asl @@ -34,16 +34,16 @@ /* Retrieve event. */ Method (MHKP, 0, NotSerialized) { - Store (BTN, Local0) - If (LNotEqual (Local0, Zero)) { - Store (Zero, BTN) - Add (Local0, 0x1000, Local0) + Local0 = BTN + If (Local0 != 0) { + BTN = 0 + Local0 += 0x1000 Return (Local0) } - Store (BTAB, Local0) - If (LNotEqual (Local0, Zero)) { - Store (Zero, BTAB) - Add (Local0, 0x5000, Local0) + Local0 = BTAB + If (Local0 != 0) { + BTAB = 0 + Local0 += 0x5000 Return (Local0) } Return (Zero) @@ -51,18 +51,18 @@ /* Report event */ Method (RHK, 1, NotSerialized) { - ShiftLeft (One, Subtract (Arg0, 1), Local0) - If (And (EMSK, Local0)) { - Store (Arg0, BTN) + Local0 = 1 << (Arg0 - 1) + If (EMSK & Local0) { + BTN = Arg0 Notify (HKEY, 0x80) } } /* Report tablet */ Method (RTAB, 1, NotSerialized) { - ShiftLeft (One, Subtract (Arg0, 1), Local0) - If (And (ETAB, Local0)) { - Store (Arg0, BTAB) + Local0 = 1 << (Arg0 - 1) + If (ETAB & Local0) { + BTAB = Arg0 Notify (HKEY, 0x80) } } @@ -70,32 +70,32 @@ /* Enable/disable all events. */ Method (MHKC, 1, NotSerialized) { If (Arg0) { - Store (DHKN, EMSK) - Store (Ones, ETAB) + EMSK = DHKN + ETAB = Ones } Else { - Store (Zero, EMSK) - Store (Zero, ETAB) + EMSK = 0 + ETAB = 0 } - Store (Arg0, EN) + EN = Arg0 } /* Enable/disable event. */ Method (MHKM, 2, NotSerialized) { - If (LLessEqual (Arg0, 0x20)) { - ShiftLeft (One, Subtract (Arg0, 1), Local0) + If (Arg0 <= 0x20) { + Local0 = 1 << (Arg0 - 1) If (Arg1) { - Or (DHKN, Local0, DHKN) + DHKN |= Local0 } Else { - And (DHKN, Not (Local0), DHKN) + DHKN &= ~Local0 } If (EN) { - Store (DHKN, EMSK) + EMSK = DHKN } } } @@ -115,7 +115,7 @@ /* Mute audio */ Method (SSMS, 1, NotSerialized) { - Store(Arg0, ALMT) + ALMT = Arg0 } /* Control mute microphone LED */ @@ -159,15 +159,15 @@ */ Method (GBDC, 0) { - Store (One, HAST) + HAST = 1 If (HBDC) { - Store(One, Local0) + Local0 = 1 If(\_SB.PCI0.LPCB.EC.BTEB) { - Or(Local0, 2, Local0) + Local0 |= 2 } - Or(Local0, ShiftLeft(WBDC, 2), Local0) + Local0 |= WBDC << 2 Return (Local0) } Else { Return (0) @@ -181,13 +181,13 @@ */ Method (SBDC, 1) { - Store (One, HAST) + HAST = 1 If (HBDC) { - ShiftRight (And(Arg0, 2), 1, Local0) - Store (Local0, \_SB.PCI0.LPCB.EC.BTEB) - ShiftRight (And(Arg0, 4), 2, Local0) - Store (Local0, WBDC) + Local0 = (Arg0 & 2) >> 1 + \_SB.PCI0.LPCB.EC.BTEB = Local0 + Local0 = (Arg0 & 4) >> 2 + WBDC = Local0 } } @@ -201,15 +201,15 @@ */ Method (GWAN, 0) { - Store (One, HAST) + HAST = 1 If (HWAN) { - Store(One, Local0) + Local0 = 1 If(\_SB.PCI0.LPCB.EC.WWEB) { - Or(Local0, 2, Local0) + Local0 |= 2 } - Or(Local0, ShiftLeft(WWAN, 2), Local0) + Local0 |= WWAN << 2 Return (Local0) } Else { Return (0) @@ -223,12 +223,12 @@ */ Method (SWAN, 1) { - Store (One, HAST) + HAST = 1 If (HWAN) { - ShiftRight (And(Arg0, 2), 1, Local0) - Store (Local0, \_SB.PCI0.LPCB.EC.WWEB) - ShiftRight (And(Arg0, 4), 2, WWAN) + Local0 = (Arg0 & 2) >> 1 + \_SB.PCI0.LPCB.EC.WWEB = Local0 + WWAN = (Arg0 & 4) >> 2 } } @@ -241,9 +241,9 @@ Method (MLCG, 1) { If (HKBL) { - Store (0x200, Local0) + Local0 = 0x200 /* FIXME: Support 2bit brightness control */ - Or (Local0, \_SB.PCI0.LPCB.EC.KBLT, Local0) + Local0 = \_SB.PCI0.LPCB.EC.KBLT Return (Local0) } Else { Return (0) @@ -258,7 +258,7 @@ { If (HKBL) { /* FIXME: Support 2bit brightness control */ - Store (And(Arg0, 1), \_SB.PCI0.LPCB.EC.WWEB) + \_SB.PCI0.LPCB.EC.WWEB = Arg0 & 1 } } @@ -270,10 +270,10 @@ Method (GUWB, 0) { If (HUWB) { - Store (One, Local0) + Local0 = 1 If(\_SB.PCI0.LPCB.EC.UWBE) { - Or(Local0, 2, Local0) + Local0 |= 2 } Return (Local0) } Else { @@ -288,8 +288,8 @@ Method (SUWB, 1) { If (HUWB) { - ShiftRight (And(Arg0, 2), 1, Local0) - Store (Local0, \_SB.PCI0.LPCB.EC.UWBE) + Local0 = (Arg0 & 2) >> 1 + \_SB.PCI0.LPCB.EC.UWBE = Local0 } } @@ -299,8 +299,8 @@ Method (WAKE, 1) { If (HAST) { - Store (WBDC, \_SB.PCI0.LPCB.EC.BTEB) - Store (WWAN, \_SB.PCI0.LPCB.EC.WWEB) + \_SB.PCI0.LPCB.EC.BTEB = WBDC + \_SB.PCI0.LPCB.EC.WWEB = WWAN } } -- To view, visit
https://review.coreboot.org/c/coreboot/+/46101
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I87bab2b11ba5e1fb585d5c88cf831b36e257c148 Gerrit-Change-Number: 46101 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu> Gerrit-MessageType: newchange
[View Less]
1
1
0
0
Change in coreboot[master]: sb/intel/i82801ix/acpi: Convert to ASL 2.0 syntax
by HAOUAS Elyes (Code Review)
14 Feb '21
14 Feb '21
HAOUAS Elyes has uploaded this change for review. (
https://review.coreboot.org/c/coreboot/+/45735
) Change subject: sb/intel/i82801ix/acpi: Convert to ASL 2.0 syntax ...................................................................... sb/intel/i82801ix/acpi: Convert to ASL 2.0 syntax Change-Id: I198f8df954f423ca5e19a7ee740ab062108ad14b Signed-off-by: Elyes HAOUAS <ehaouas(a)noos.fr> --- M src/southbridge/intel/i82801ix/acpi/ich9.asl M src/southbridge/intel/i82801ix/acpi/lpc.asl M
…
[View More]
src/southbridge/intel/i82801ix/acpi/usb.asl 3 files changed, 21 insertions(+), 21 deletions(-) git pull ssh://review.coreboot.org:29418/coreboot refs/changes/35/45735/1 diff --git a/src/southbridge/intel/i82801ix/acpi/ich9.asl b/src/southbridge/intel/i82801ix/acpi/ich9.asl index 25a756e..11595d2 100644 --- a/src/southbridge/intel/i82801ix/acpi/ich9.asl +++ b/src/southbridge/intel/i82801ix/acpi/ich9.asl @@ -174,7 +174,7 @@ Method (_OSC, 4) { /* Check for proper GUID */ - If (LEqual (Arg0, ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766"))) + If (Arg0 == ToUUID("33DB4D5B-1FF7-401C-9657-7441C03DD766")) { /* Let OS control everything */ Return (Arg3) @@ -183,7 +183,7 @@ { /* Unrecognized UUID */ CreateDWordField (Arg3, 0, CDW1) - Or (CDW1, 4, CDW1) + CDW1|= 4 Return (Arg3) } } diff --git a/src/southbridge/intel/i82801ix/acpi/lpc.asl b/src/southbridge/intel/i82801ix/acpi/lpc.asl index b93fa96..1f9e701 100644 --- a/src/southbridge/intel/i82801ix/acpi/lpc.asl +++ b/src/southbridge/intel/i82801ix/acpi/lpc.asl @@ -73,7 +73,7 @@ If (HPTE) { // Note: Ancient versions of Windows don't want // to see the HPET in order to work right - If (LGreaterEqual(OSYS, 2001)) { + If (OSYS >= 2001) { Return (0xf) // Enable and show device } Else { Return (0xb) // Enable and don't show device @@ -87,16 +87,16 @@ { If (HPTE) { CreateDWordField(BUF0, \_SB.PCI0.LPCB.HPET.FED0._BAS, HPT0) - If (Lequal(HPAS, 1)) { - Add(CONFIG_HPET_ADDRESS, 0x1000, HPT0) + If (HPAS == 1) { + HPT0 = CONFIG_HPET_ADDRESS + 0x1000 } - If (Lequal(HPAS, 2)) { - Add(CONFIG_HPET_ADDRESS, 0x2000, HPT0) + If (HPAS == 2) { + HPT0 = CONFIG_HPET_ADDRESS + 0x2000 } - If (Lequal(HPAS, 3)) { - Add(CONFIG_HPET_ADDRESS, 0x3000, HPT0) + If (HPAS == 3) { + HPT0 = CONFIG_HPET_ADDRESS + 0x3000 } } diff --git a/src/southbridge/intel/i82801ix/acpi/usb.asl b/src/southbridge/intel/i82801ix/acpi/usb.asl index 55929af..f55ed66 100644 --- a/src/southbridge/intel/i82801ix/acpi/usb.asl +++ b/src/southbridge/intel/i82801ix/acpi/usb.asl @@ -21,9 +21,9 @@ { // USB Controller can wake OS from Sleep State If (Arg0) { - Store (3, U1WE) + U1WE = 3 } Else { - Store (0, U1WE) + U1WE = 0 } } @@ -60,9 +60,9 @@ { // USB Controller can wake OS from Sleep State If (Arg0) { - Store (3, U2WE) + U2WE = 3 } Else { - Store (0, U2WE) + U2WE = 0 } } @@ -100,9 +100,9 @@ { // USB Controller can wake OS from Sleep State If (Arg0) { - Store (3, U3WE) + U3WE = 3 } Else { - Store (0, U3WE) + U3WE = 0 } } @@ -175,9 +175,9 @@ { // USB Controller can wake OS from Sleep State If (Arg0) { - Store (3, U1WE) + U1WE = 3 } Else { - Store (0, U1WE) + U1WE = 0 } } @@ -214,9 +214,9 @@ { // USB Controller can wake OS from Sleep State If (Arg0) { - Store (3, U2WE) + U2WE = 3 } Else { - Store (0, U2WE) + U2WE = 0 } } @@ -254,9 +254,9 @@ { // USB Controller can wake OS from Sleep State If (Arg0) { - Store (3, U3WE) + U3WE = 3 } Else { - Store (0, U3WE) + U3WE = 0 } } -- To view, visit
https://review.coreboot.org/c/coreboot/+/45735
To unsubscribe, or for help writing mail filters, visit
https://review.coreboot.org/settings
Gerrit-Project: coreboot Gerrit-Branch: master Gerrit-Change-Id: I198f8df954f423ca5e19a7ee740ab062108ad14b Gerrit-Change-Number: 45735 Gerrit-PatchSet: 1 Gerrit-Owner: HAOUAS Elyes <ehaouas(a)noos.fr> Gerrit-MessageType: newchange
[View Less]
2
4
0
0
← Newer
1
...
87
88
89
90
91
92
93
...
348
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
Results per page:
10
25
50
100
200