Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

misc/bt-host: Add facility for interrupt-driven BT messages #18

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,8 @@ source "arch/arm/mach-meson/Kconfig"

source "arch/arm/mach-moxart/Kconfig"

source "arch/arm/mach-aspeed/Kconfig"

source "arch/arm/mach-mv78xx0/Kconfig"

source "arch/arm/mach-imx/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions arch/arm/Kconfig.debug
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,7 @@ choice

config DEBUG_LL_UART_8250
bool "Kernel low-level debugging via 8250 UART"
select DEBUG_UART_8250
help
Say Y here if you wish the debug print routes to direct
their output to an 8250 UART. You can use this option
Expand Down
4 changes: 2 additions & 2 deletions arch/arm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ machine-$(CONFIG_ARCH_LPC32XX) += lpc32xx
machine-$(CONFIG_ARCH_MESON) += meson
machine-$(CONFIG_ARCH_MMP) += mmp
machine-$(CONFIG_ARCH_MOXART) += moxart
machine-$(CONFIG_ARCH_ASPEED) += aspeed
machine-$(CONFIG_ARCH_MSM) += msm
machine-$(CONFIG_ARCH_MV78XX0) += mv78xx0
machine-$(CONFIG_ARCH_MVEBU) += mvebu
machine-$(CONFIG_ARCH_MXC) += imx
Expand Down Expand Up @@ -258,13 +260,11 @@ endif
machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
platdirs := $(patsubst %,arch/arm/plat-%/,$(sort $(plat-y)))

ifneq ($(CONFIG_ARCH_MULTIPLATFORM),y)
ifeq ($(KBUILD_SRC),)
KBUILD_CPPFLAGS += $(patsubst %,-I%include,$(machdirs) $(platdirs))
else
KBUILD_CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs) $(platdirs))
endif
endif

export TEXT_OFFSET GZFLAGS MMUEXT

Expand Down
44 changes: 44 additions & 0 deletions arch/arm/boot/compressed/atags_to_fdt.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include <asm/setup.h>
#include <libfdt.h>

#include CONFIG_UNCOMPRESS_INCLUDE

#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND)
#define do_extend_cmdline 1
#else
Expand Down Expand Up @@ -105,6 +107,34 @@ static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
* = 1 -> bad ATAG (may retry with another possible ATAG pointer)
* < 0 -> error from libfdt
*/
void putstr(const char *ptr)
{
char c;

while ((c = *ptr++) != '\0') {
if (c == '\n')
putc('\r');
putc(c);
}

flush();
}

static void puthex(unsigned long val)
{
int i, nibbles = sizeof(val)*2;
char buf[sizeof(val)*2+1];

for (i = nibbles-1; i >= 0; i--) {
buf[i] = (val & 0xf) + '0';
if (buf[i] > '9')
buf[i] += ('a'-'0'-10);
val >>= 4;
}
buf[nibbles] = '\0';
putstr(buf);
}

int atags_to_fdt(void *atag_list, void *fdt, int total_space)
{
struct tag *atag = atag_list;
Expand All @@ -114,6 +144,12 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
int memcount = 0;
int ret, memsize;

putstr("atags_to_fdt\natags=");
puthex((unsigned long)atag_list);
putstr("\nfdt=");
puthex((unsigned long)fdt);
putstr("\n");

/* make sure we've got an aligned pointer */
if ((u32)atag_list & 0x3)
return 1;
Expand Down Expand Up @@ -141,6 +177,9 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
* the device tree and in the tags, the one from the
* tags will be chosen.
*/
putstr("cmdline=");
putstr(atag->u.cmdline.cmdline);
putstr("\n");
if (do_extend_cmdline)
merge_fdt_bootargs(fdt,
atag->u.cmdline.cmdline);
Expand All @@ -164,6 +203,11 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space)
cpu_to_fdt64(atag->u.mem.start);
mem_reg_prop64[memcount++] =
cpu_to_fdt64(atag->u.mem.size);
putstr("mem=");
puthex(atag->u.mem.start);
putstr("/");
puthex(atag->u.mem.size);
putstr("\n");
} else {
mem_reg_property[memcount++] =
cpu_to_fdt32(atag->u.mem.start);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/boot/dts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -738,6 +738,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += \
mt8127-moose.dtb \
mt8135-evbp1.dtb
dtb-$(CONFIG_ARCH_ZX) += zx296702-ad1.dtb
dtb-$(CONFIG_MACH_OPP_PALMETTO_BMC) += aspeed-bmc-opp-palmetto.dtb
endif

always := $(dtb-y)
Expand Down
42 changes: 42 additions & 0 deletions arch/arm/boot/dts/aspeed-bmc-opp-barreleye.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/dts-v1/;

#include "ast2400.dtsi"

/ {
model = "Barrelye BMC";
compatible = "rackspace,barreleye-bmc", "aspeed,ast2400";
ahb {
apb {
i2c: i2c@1e78a040 {
i2c0: i2c-bus@0x40 {
eeprom@50 {
compatible = "atmel,24c256";
reg = <0x50>;
pagesize = <64>;
};
rtc@68 {
compatible = "dallas,ds3231";
reg = <0x68>;
// interrupts = <GPIOF0>
};
lm75@4a {
compatible = "national,lm75";
reg = <0x4a>;
};
};

i2c6: i2c-bus@0x1C0 {
nct7904@2d {
compatible = "nuvoton,nct7904";
reg = <0x2d>;
};
nct7904@2e {
compatible = "nuvoton,nct7904";
reg = <0x2e>;
};
};
};
};
};
};

34 changes: 34 additions & 0 deletions arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/dts-v1/;

#include "ast2400.dtsi"

/ {
model = "Palmetto BMC";
compatible = "tyan,palmetto-bmc", "aspeed,ast2400";

ahb {
apb {
i2c: i2c@1e78a040 {
i2c0: i2c-bus@0x40 {
eeprom@50 {
compatible = "atmel,24c256";
reg = <0x50>;
pagesize = <64>;
};
rtc@68 {
compatible = "dallas,ds3231";
reg = <0x68>;
// interrupts = <GPIOF0>
};
};

i2c2: i2c-bus@0xC0 {
tmp423@4c {
compatible = "ti,tmp423";
reg = <0x4c>;
};
};
};
};
};
};
Loading