Peichao Li has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39424 )
Change subject: mb/google/octopus: Add custom SAR values for Foob360
......................................................................
mb/google/octopus: Add custom SAR values for Foob360
Foob360 would prefer to use different SAR values. Since Foob360
sku id is 9.
BUG=b:149362272
BRANCH=octopus
TEST=build
Signed-off-by: peichao.wang <peichao.wang(a)bitland.corp-partner.google.com>
Change-Id: I8cc5d73629990f19d2c1044debdba4990c54d07e
---
M src/mainboard/google/octopus/variants/foob/Makefile.inc
A src/mainboard/google/octopus/variants/foob/mainboard.c
2 files changed, 33 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/39424/1
diff --git a/src/mainboard/google/octopus/variants/foob/Makefile.inc b/src/mainboard/google/octopus/variants/foob/Makefile.inc
index a291304..a800275 100644
--- a/src/mainboard/google/octopus/variants/foob/Makefile.inc
+++ b/src/mainboard/google/octopus/variants/foob/Makefile.inc
@@ -1,3 +1,4 @@
bootblock-y += gpio.c
ramstage-y += gpio.c
ramstage-y += variant.c
+ramstage-y += mainboard.c
diff --git a/src/mainboard/google/octopus/variants/foob/mainboard.c b/src/mainboard/google/octopus/variants/foob/mainboard.c
new file mode 100644
index 0000000..2619162
--- /dev/null
+++ b/src/mainboard/google/octopus/variants/foob/mainboard.c
@@ -0,0 +1,32 @@
+/*
+ *thiss file is part of the coreboot project.
+ *
+ * Copyright 2020 Google LLC
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <boardid.h>
+#include <ec/google/chromeec/ec.h>
+#include <sar.h>
+
+const char *get_wifi_sar_cbfs_filename(void)
+{
+ const char *filename = NULL;
+ uint32_t sku_id;
+
+ if (google_chromeec_cbi_get_sku_id(&sku_id))
+ return NULL;
+
+ if (sku_id == 9)
+ filename = "wifi_sar-foob360.hex";
+
+ return filename;
+}
--
To view, visit https://review.coreboot.org/c/coreboot/+/39424
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I8cc5d73629990f19d2c1044debdba4990c54d07e
Gerrit-Change-Number: 39424
Gerrit-PatchSet: 1
Gerrit-Owner: Peichao Li <peichao.wang(a)bitland.corp-partner.google.com>
Gerrit-MessageType: newchange
Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39577 )
Change subject: mb/purism: remove duplicate ACPI power button
......................................................................
mb/purism: remove duplicate ACPI power button
These platforms use the standard fixed function power button
and do not need a second power button device declared or the
kernel will end up with two devices reporting the same event.
Change-Id: I17c85e43493530d04f4fa13f33bec6d027cb3147
Signed-off-by: Matt DeVillier <matt.devillier(a)puri.sm>
---
M src/mainboard/purism/librem_bdw/acpi/mainboard.asl
M src/mainboard/purism/librem_skl/acpi/mainboard.asl
2 files changed, 0 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/77/39577/1
diff --git a/src/mainboard/purism/librem_bdw/acpi/mainboard.asl b/src/mainboard/purism/librem_bdw/acpi/mainboard.asl
index f0b2c1d..0e4842d 100644
--- a/src/mainboard/purism/librem_bdw/acpi/mainboard.asl
+++ b/src/mainboard/purism/librem_bdw/acpi/mainboard.asl
@@ -30,18 +30,6 @@
}
}
- Device (PWRB)
- {
- Name (_HID, EisaId ("PNP0C0C"))
-
- Method (_STA)
- {
- Return (0xF)
- }
-
- Name (_PRW, Package () { 27, 4 })
- }
-
Device (SLPB)
{
Name (_HID, EisaId ("PNP0C0E"))
diff --git a/src/mainboard/purism/librem_skl/acpi/mainboard.asl b/src/mainboard/purism/librem_skl/acpi/mainboard.asl
index f0b2c1d..0e4842d 100644
--- a/src/mainboard/purism/librem_skl/acpi/mainboard.asl
+++ b/src/mainboard/purism/librem_skl/acpi/mainboard.asl
@@ -30,18 +30,6 @@
}
}
- Device (PWRB)
- {
- Name (_HID, EisaId ("PNP0C0C"))
-
- Method (_STA)
- {
- Return (0xF)
- }
-
- Name (_PRW, Package () { 27, 4 })
- }
-
Device (SLPB)
{
Name (_HID, EisaId ("PNP0C0E"))
--
To view, visit https://review.coreboot.org/c/coreboot/+/39577
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I17c85e43493530d04f4fa13f33bec6d027cb3147
Gerrit-Change-Number: 39577
Gerrit-PatchSet: 1
Gerrit-Owner: Matt DeVillier <matt.devillier(a)gmail.com>
Gerrit-MessageType: newchange
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39485 )
Change subject: memrange: Add a helper function to determine if memranges is empty
......................................................................
memrange: Add a helper function to determine if memranges is empty
This change adds a helper function memranges_is_empty() which returns
true if there are no entries in memranges.
BUG=b:149186922
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Change-Id: If841c42a9722cbc73ef321568928bc175bf88fd5
---
M src/include/memrange.h
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/85/39485/1
diff --git a/src/include/memrange.h b/src/include/memrange.h
index 9b1d1d2..8406237 100644
--- a/src/include/memrange.h
+++ b/src/include/memrange.h
@@ -81,6 +81,11 @@
r->tag = new_tag;
}
+static inline bool memranges_is_empty(struct memranges *ranges)
+{
+ return ranges->entries == NULL;
+}
+
/* Iterate over each entry in a memranges structure. Ranges cannot
* be deleted while processing each entry as the list cannot be safely
* traversed after such an operation.
--
To view, visit https://review.coreboot.org/c/coreboot/+/39485
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: If841c42a9722cbc73ef321568928bc175bf88fd5
Gerrit-Change-Number: 39485
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: newchange
Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/39483 )
Change subject: memrange: Enable memranges to support different alignments
......................................................................
memrange: Enable memranges to support different alignments
This change enables memranges library to support addresses with
different alignments. Before this change, memranges library supported
aligning addresses to 4KiB only. Though this works for most cases, it
might not be the right alignment for every use case. Example: There
are some resource allocator changes coming up that require a different
alignment when handling the range list.
This change adds a align parameter to struct memranges that determines
the alignment of all range lists in that memrange. In order to
continue supporting current users of memranges, default alignment is
maintained as 4KiB.
BUG=b:149186922
Signed-off-by: Furquan Shaikh <furquan(a)google.com>
Change-Id: I1da0743ff89da734c9a0972e3c56d9f512b3d1e8
---
M src/include/memrange.h
M src/lib/memrange.c
2 files changed, 34 insertions(+), 15 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/83/39483/1
diff --git a/src/include/memrange.h b/src/include/memrange.h
index 7f42aa2..fba77af 100644
--- a/src/include/memrange.h
+++ b/src/include/memrange.h
@@ -24,6 +24,8 @@
/* coreboot doesn't have a free() function. Therefore, keep a cache of
* free'd entries. */
struct range_entry *free_list;
+ /* Alignment for base and end addresses of the range. */
+ size_t align;
};
/* Each region within a memranges structure is represented by a
@@ -86,17 +88,32 @@
#define memranges_each_entry(r, ranges) \
for (r = (ranges)->entries; r != NULL; r = r->next)
+
/* Initialize memranges structure providing an optional array of range_entry
- * to use as the free list. */
-void memranges_init_empty(struct memranges *ranges, struct range_entry *free,
- size_t num_free);
+ * to use as the free list. Additionally, it accepts an align parameter that
+ * determines the alignment of addresses. */
+void memranges_init_empty_with_alignment(struct memranges *ranges,
+ struct range_entry *free,
+ size_t num_free, size_t align);
/* Initialize and fill a memranges structure according to the
* mask and match type for all memory resources. Tag each entry with the
- * specified type. */
-void memranges_init(struct memranges *ranges,
+ * specified type. Additionally, it accepts an align parameter that
+ * determines the alignment of addresses. */
+void memranges_init_with_alignment(struct memranges *ranges,
unsigned long mask, unsigned long match,
- unsigned long tag);
+ unsigned long tag, size_t align);
+
+/* Initialize memranges structure providing an optional array of range_entry
+ * to use as the free list. Addresses are default aligned to 4KiB. */
+#define memranges_init_empty(__ranges, __free, __num_free) \
+ memranges_init_empty_with_alignment(__ranges, __free, __num_free, 4 * KiB)
+
+/* Initialize and fill a memranges structure according to the
+ * mask and match type for all memory resources. Tag each entry with the
+ * specified type. Addresses are default aligned to 4KiB. */
+#define memranges_init(__ranges, __mask, __match, __tag) \
+ memranges_init_with_alignment(__ranges, __mask, __match, __tag, 4 * KiB)
/* Clone a memrange. The new memrange has the same entries as the old one. */
void memranges_clone(struct memranges *newranges, struct memranges *oldranges);
diff --git a/src/lib/memrange.c b/src/lib/memrange.c
index 79a1b0e..a76f24c 100644
--- a/src/lib/memrange.c
+++ b/src/lib/memrange.c
@@ -231,9 +231,9 @@
/* The addresses are aligned to 4096 bytes: the begin address is
* aligned down while the end address is aligned up to be conservative
* about the full range covered. */
- begin = ALIGN_DOWN(base, 4096);
+ begin = ALIGN_DOWN(base, ranges->align);
end = begin + size + (base - begin);
- end = ALIGN_UP(end, 4096) - 1;
+ end = ALIGN_UP(end, ranges->align) - 1;
action(ranges, begin, end, tag);
}
@@ -290,23 +290,25 @@
memranges_add_resources_filter(ranges, mask, match, tag, NULL);
}
-void memranges_init_empty(struct memranges *ranges, struct range_entry *to_free,
- size_t num_free)
+void memranges_init_empty_with_alignment(struct memranges *ranges,
+ struct range_entry *to_free,
+ size_t num_free, size_t align)
{
size_t i;
ranges->entries = NULL;
ranges->free_list = NULL;
+ ranges->align = align;
for (i = 0; i < num_free; i++)
range_entry_link(&ranges->free_list, &to_free[i]);
}
-void memranges_init(struct memranges *ranges,
- unsigned long mask, unsigned long match,
- unsigned long tag)
+void memranges_init_with_alignment(struct memranges *ranges,
+ unsigned long mask, unsigned long match,
+ unsigned long tag, size_t align)
{
- memranges_init_empty(ranges, NULL, 0);
+ memranges_init_empty_with_alignment(ranges, NULL, 0, align);
memranges_add_resources(ranges, mask, match, tag);
}
@@ -316,7 +318,7 @@
struct range_entry *r, *cur;
struct range_entry **prev_ptr;
- memranges_init_empty(newranges, NULL, 0);
+ memranges_init_empty_with_alignment(newranges, NULL, 0, oldranges->align);
prev_ptr = &newranges->entries;
memranges_each_entry(r, oldranges) {
--
To view, visit https://review.coreboot.org/c/coreboot/+/39483
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I1da0743ff89da734c9a0972e3c56d9f512b3d1e8
Gerrit-Change-Number: 39483
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan(a)google.com>
Gerrit-MessageType: newchange
Ronak Kanabar has restored this change. ( https://review.coreboot.org/c/coreboot/+/39426 )
Change subject: Temp full gpio.c and devicetree.cb
......................................................................
Restored
--
To view, visit https://review.coreboot.org/c/coreboot/+/39426
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibfdd1bbb0865d57161c6fba23d0543fd4619ddc0
Gerrit-Change-Number: 39426
Gerrit-PatchSet: 2
Gerrit-Owner: Ronak Kanabar <ronak.kanabar(a)intel.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela(a)intel.com>
Gerrit-MessageType: restore