From: Grant Likely <grant.likely-s3s/WqlpOiPyB63q8FvJNQ@public.gmane.org>
To: Jeremy Kerr <jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org>,
devicetree-discuss
<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>
Subject: Notes on consolidating device tree patches
Date: Wed, 17 Feb 2010 12:47:37 -0700 [thread overview]
Message-ID: <fa686aa41002171147j67921cfhb6aa9b7bc6d24ee7@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6037 bytes --]
Hi Jeremy,
I've done some consolidation work between our two trees. Here's the
show-branch of what I started with:
! [test-devicetree] arm/boot/hack: set uImage load address to 0x81000000
! [jk/versatile] arm/versatile: probe devices from device tree
--
+ [jk/versatile] arm/versatile: probe devices from device tree
+ [jk/versatile^] arm/versatile: probe via device tree
+ [jk/versatile~2] drivers/amba: probe via device tree
+ [jk/versatile~3] drivers/amba: separate periphid probe logic from
amba_device_register
+ [jk/versatile~4] arm/clkdev: lookup clocks from OF clock providers
+ [jk/versatile~5] arm/icst307: remove icst307_ps_to_vco
+ [jk/versatile~6] arm/icst307: use common struct clk, unify realview
and versatile clocks
+ [jk/versatile~7] arm/realview: use generic struct clk
+ [jk/versatile~8] arm/versatile: remove oscoff from clk_versatile
+ [jk/versatile~9] arm/versatile: use generic struct clk
+ [jk/versatile~10] of/clk: parse fixed clocks
+ [jk/versatile~11] of: add clock providers
+ [jk/versatile~12] Generic support for fixed-rate clocks
+ [jk/versatile~13] Add a common struct clk
+ [jk/versatile~14] arm-dt: add devictree node reference to dev_archdata
+ [jk/versatile~15] arm-dt: unflatten device tree
+ [jk/versatile~16] arm-dt: parse initrd from device tree
+ [jk/versatile~17] arm-dt: probe for platforms via the device tree
+ [jk/versatile~18] arm-dt: reserve bootmem containing flat device tree blob
+ [jk/versatile~19] arm-dt: parse devtree pointer on boot
+ [jk/versatile~20] of/flattree: include linux/of.h
+ [jk/versatile~21] arm-dt: postpone machine detection until
setup_arch with CONFIG_OF
+ [test-devicetree] arm/boot/hack: set uImage load address to 0x81000000
+ [test-devicetree^] arm/devicetree: Don't allow CONFIG_DEBUG_LL with
device tree
+ [test-devicetree~2] arm-dt: unflatten device tree
+ [test-devicetree~3] arm/devicetree: Reserve memory used by dtb blob
+ [test-devicetree~4] arm/devicetree: Allow .dtb to be carried in the
zImage payload
++ [jk/versatile~22] arm-dt: Allow CONFIG_OF on ARM
To start, I move some things around and split stuff out in my branch
to give you a new base point:
[test-devicetree^] Don't allow CONFIG_DEBUG_LL
- dropped.
- you merged this into jk/versatile~21
[test-devicetree~2] arm-dt: unflatten device tree
- Split into new patches:
- the of_fdt.h #if defined(CONFIG_OF_FLATTREE)
- the extra error checking
- You should be able to drop [jk/versatile~15] arm-dt: unflatten device tree
[test-devicetree~3] arm/devicetree: Reserve memory used by dtb blob
- Almost identical to [jk/versatile~18] arm-dt: reserve bootmem...
- Would you consider dropping jk/versatile~18 and replacing it with
the diff from test-devicetree~3..jk/versatile~18? I'd like to have
the base series of patches that enables fdt support in arm to not
change the boot path. I've attached the diff that I think you'll
need.
[test-devicetree] arm/boot/hack: set uImage load address to 0x81000000
and
[test-devicetree~4] arm/devicetree: Allow .dtb to be carried in the
zImage payload
- moved to the end of my queue because you don't want these in your tree.
Also, in your queue, you should be able to:
[jk/versatile~20] of/flattree: include linux/of.h
- drop; the problem is fixed in next-devicetree
[jk/versatile~18] arm-dt: reserve bootmem containing flat device tree blob
- replace; as mentioned above
[jk/versatile~14] arm-dt: add devictree node reference to dev_archdata
- drop; I've picked it up into my tree
- Although what I'd really like to do here is move the of_node
pointer into the main struct device and eliminate the archdata
entirely. I'll see if I get time to work on this.
The showbranch now looks like this for me:
* [secretlab/test-devicetree] arm/boot/hack: set uImage load address
to 0x81000000
! [jk/versatile] arm/versatile: probe devices from device tree
--
* [secretlab/test-devicetree] arm/boot/hack: set uImage load address
to 0x81000000
* [secretlab/test-devicetree^] arm/devicetree: Allow .dtb to be
carried in the zImage payload
* [secretlab/test-devicetree~2] arm/devicetree: Reserve memory used by dtb blob
* [secretlab/test-devicetree~3] arm-dt: add devictree node reference
to dev_archdata
* [secretlab/test-devicetree~4] arm-dt: unflatten device tree
* [secretlab/test-devicetree~5] of/flattree: Make
unflatten_device_tree() safe to call from any arch
* [secretlab/test-devicetree~6] of/flattree: make of_fdt.h safe to
unconditionally include.
+ [jk/versatile] arm/versatile: probe devices from device tree
+ [jk/versatile^] arm/versatile: probe via device tree
+ [jk/versatile~2] drivers/amba: probe via device tree
+ [jk/versatile~3] drivers/amba: separate periphid probe logic from
amba_device_register
+ [jk/versatile~4] arm/clkdev: lookup clocks from OF clock providers
+ [jk/versatile~5] arm/icst307: remove icst307_ps_to_vco
+ [jk/versatile~6] arm/icst307: use common struct clk, unify realview
and versatile clocks
+ [jk/versatile~7] arm/realview: use generic struct clk
+ [jk/versatile~8] arm/versatile: remove oscoff from clk_versatile
+ [jk/versatile~9] arm/versatile: use generic struct clk
+ [jk/versatile~10] of/clk: parse fixed clocks
+ [jk/versatile~11] of: add clock providers
+ [jk/versatile~12] Generic support for fixed-rate clocks
+ [jk/versatile~13] Add a common struct clk
+ [jk/versatile~14] arm-dt: add devictree node reference to dev_archdata
+ [jk/versatile~15] arm-dt: unflatten device tree
+ [jk/versatile~16] arm-dt: parse initrd from device tree
+ [jk/versatile~17] arm-dt: probe for platforms via the device tree
+ [jk/versatile~18] arm-dt: reserve bootmem containing flat device tree blob
+ [jk/versatile~19] arm-dt: parse devtree pointer on boot
+ [jk/versatile~20] of/flattree: include linux/of.h
+ [jk/versatile~21] arm-dt: postpone machine detection until
setup_arch with CONFIG_OF
*+ [secretlab/test-devicetree~7] arm-dt: Allow CONFIG_OF on ARM
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
[-- Attachment #2: arm-reserve-dtb-rework --]
[-- Type: application/octet-stream, Size: 2533 bytes --]
commit e71e8dcd0c9d93e3d9dbb9d1c14313d7c5ed9aef
Author: Grant Likely <grant.likely@secretlab.ca>
Date: Wed Feb 17 12:30:42 2010 -0700
arm/dt: rework device tree memory reservation for early parsing
Jeremy, I believe this is the diff needed to go from my atags parsed
device tree memory reservation to yours. I dropped the setup.c hunk
because of a conflict, so you'll need to add it back.
g.
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 2ceb21b..866a038 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -74,14 +74,11 @@ __tagtable(ATAG_INITRD2, parse_tag_initrd2);
static unsigned long phys_devtree_start __initdata = 0;
static unsigned long phys_devtree_size __initdata = 0;
-static int __init parse_tag_devtree(const struct tag *tag)
+void __init bootmem_register_devtree(unsigned long start, unsigned long size)
{
- phys_devtree_start = tag->u.devtree.start;
- phys_devtree_size = tag->u.devtree.size;
- return 0;
+ phys_devtree_start = start;
+ phys_devtree_size = size;
}
-
-__tagtable(ATAG_DEVTREE, parse_tag_devtree);
#endif
/*
@@ -253,6 +250,9 @@ static int __init check_devtree(struct meminfo *mi)
if ((phys_devtree_start == 0) || (phys_devtree_size == 0))
goto out;
+ pr_info("DEVICETREE: 0x%08lx+0x%08lx Checking memory region\n",
+ phys_devtree_start, phys_devtree_size);
+
node = check_region(mi, phys_devtree_start, phys_devtree_size);
if (node == -1) {
phys_devtree_start = phys_devtree_size = 0;
@@ -260,6 +260,8 @@ static int __init check_devtree(struct meminfo *mi)
"physical memory - disabling device tree\n",
phys_devtree_start, phys_devtree_size);
}
+
+ pr_info("DEVICETREE: node=%i\n", node);
#endif
out:
@@ -356,12 +358,9 @@ static void __init bootmem_reserve_devtree(int node)
phys_devtree_size, BOOTMEM_EXCLUSIVE);
if (res) {
pr_err("DEVICETREE: 0x%08lx+0x%08lx overlaps in-use "
- "memory region - disabling device tree\n",
+ "memory region\n",
phys_devtree_start, phys_devtree_size);
- return;
}
-
- initial_boot_params = (void *)__phys_to_virt(phys_devtree_start);
#endif
}
diff --git a/arch/arm/mm/mm.h b/arch/arm/mm/mm.h
index a888363..0e58c20 100644
--- a/arch/arm/mm/mm.h
+++ b/arch/arm/mm/mm.h
@@ -35,3 +35,4 @@ struct pglist_data;
void __init create_mapping(struct map_desc *md);
void __init bootmem_init(void);
void reserve_node_zero(struct pglist_data *pgdat);
+void __init bootmem_register_devtree(unsigned long start, unsigned long size);
[-- Attachment #3: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
reply other threads:[~2010-02-17 19:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fa686aa41002171147j67921cfhb6aa9b7bc6d24ee7@mail.gmail.com \
--to=grant.likely-s3s/wqlpoipyb63q8fvjnq@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=jeremy.kerr-Z7WLFzj8eWMS+FvcfC7Uqw@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox