Exynos4: added RTC device
Il 29/06/2012 14:26, Andreas Färber ha scritto:
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Oh, I see. Should we place this device to hw/Makefile.objs in v2?
That would've been nice, but I'll do it as a follow-up now.
Yes, so we can also use Anthony's new CONFIG_ARCH_ARM (introducing CONFIG_EXYNOS can be done later).
Paolo
Quoted 12 lines · Paolo Bonzini
Il 29/06/2012 14:26, Andreas Färber ha scritto:
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Oh, I see. Should we place this device to hw/Makefile.objs in v2?
That would've been nice, but I'll do it as a follow-up now.
Yes, so we can also use Anthony's new
CONFIG_ARCH_ARM(introducingCONFIG_EXYNOScan be done later).Paolo
So, what's the consensus here, for now new devices go to hw/arm/Makefile.objs while somebody moves all new and old not cpu-specific devices (not just exynos-related) from hw/arm/Makefile.objs to hw/Makefile.objs with one commit? Because having one RTC device compile through hw/Makefile.objs while all other exynos devices are compiled through hw/arm/Makefile.objs doesn't makes much sense.
And also its not clear whether you're planning to compile these devices through obj-y or through hw-obj-y, because we still have target_phys_addr_t in our memory API.
Quoted 6 lines · Igor Mitsyanko
So, what's the consensus here, for now new devices go to hw/arm/Makefile.objs while somebody moves all new and old not cpu-specific devices (not just exynos-related) from hw/arm/Makefile.objs to hw/Makefile.objs with one commit? Because having one RTC device compile through hw/Makefile.objs while all other exynos devices are compiled through hw/arm/Makefile.objs doesn't makes much sense.
I don't want things moved piecemeal, especially not one file from a whole board model.
I'd also like to see a nice clear summary of the ground rules first (ie how you decide which makefile / target / whatever a file should be in). At the moment I'm not really sure what the rules are, which means I can't properly review those bits of patches.
-- PMM
Il 02/07/2012 11:31, Peter Maydell ha scritto:
Quoted 8 lines · Igor Mitsyanko
Quoted 6 lines
So, what's the consensus here, for now new devices go to hw/arm/Makefile.objs while somebody moves all new and old not cpu-specific devices (not just exynos-related) from hw/arm/Makefile.objs to hw/Makefile.objs with one commit? Because having one RTC device compile through hw/Makefile.objs while all other exynos devices are compiled through hw/arm/Makefile.objs doesn't makes much sense.
Quoted 7 lines
I don't want things moved piecemeal, especially not one file from a whole board model.
I'd also like to see a nice clear summary of the ground rules first (ie how you decide which makefile / target / whatever a file should be in). At the moment I'm not really sure what the rules are, which means I can't properly review those bits of patches.
For now nothing should change compared to the past, except that obj-y should appear in hw/ARCH/Makefile.objs rather than Makefile.target. This is because there is still no mechanism to guard the build of ARM-only devices from hw/Makefile.objs. When Anthony's patch lands, we can start moving files to hw/Makefile.objs using CONFIG_ARCH_ARM; I understood Andreas is going to do that.
For new boards, you may want to request a new CONFIG_* symbol (e.g. CONFIG_EXYNOS) so that new boards can already compile their devices from hw/Makefile.objs. However, that's up to you and definitely shouldn't be done for one file from a whole board model, as you said.
Paolo
Il 02/07/2012 11:37, Paolo Bonzini ha scritto:
Quoted 17 lines
Il 02/07/2012 11:31, Peter Maydell ha scritto:
Quoted 8 lines · Igor Mitsyanko
Quoted 6 lines
So, what's the consensus here, for now new devices go to hw/arm/Makefile.objs while somebody moves all new and old not cpu-specific devices (not just exynos-related) from hw/arm/Makefile.objs to hw/Makefile.objs with one commit? Because having one RTC device compile through hw/Makefile.objs while all other exynos devices are compiled through hw/arm/Makefile.objs doesn't makes much sense.
Quoted 7 lines
I don't want things moved piecemeal, especially not one file from a whole board model.
I'd also like to see a nice clear summary of the ground rules first (ie how you decide which makefile / target / whatever a file should be in). At the moment I'm not really sure what the rules are, which means I can't properly review those bits of patches.
Quoted 6 lines
For now nothing should change compared to the past, except that obj-y should appear in hw/ARCH/Makefile.objs rather than Makefile.target. This is because there is still no mechanism to guard the build of ARM-only devices from hw/Makefile.objs. When Anthony's patch lands, we can start moving files to hw/Makefile.objs using
CONFIG_ARCH_ARM; I understood Andreas is going to do that.
Small addendum: I think the idea should be to put source in hw/ARCH if it has a hard dependency on target-ARCH, otherwise we can leave it in hw/ and decide on a case-by-case basis.
Personally, I believe it'd be best if board descriptions were moved to hw/ARCH, even if all the required hardware is in hw/ and even if the file can be moved from obj-y to hw-obj-y. However, this can be left open to later discussion, and is complicated by the fact that some boards (e.g. musicpal) include devices and machine models in the same file.
Paolo
Quoted 5 lines · Paolo Bonzini
Personally, I believe it'd be best if board descriptions were moved to hw/ARCH, even if all the required hardware is in hw/ and even if the file can be moved from obj-y to hw-obj-y. However, this can be left open to later discussion, and is complicated by the fact that some boards (e.g. musicpal) include devices and machine models in the same file.
I don't personally see the distinction between "device model" and "machine model" as particularly interesting, and I hope/think that with increased QOMification the implementation differences beween the two will tend go away.
-- PMM
Il 02/07/2012 11:44, Peter Maydell ha scritto:
Quoted 10 lines · Paolo Bonzini
Quoted 5 lines
Quoted 5 lines
Personally, I believe it'd be best if board descriptions were moved to hw/ARCH, even if all the required hardware is in hw/ and even if the file can be moved from obj-y to hw-obj-y. However, this can be left open to later discussion, and is complicated by the fact that some boards (e.g. musicpal) include devices and machine models in the same file.
I don't personally see the distinction between "device model" and "machine model" as particularly interesting, and I hope/think that with increased QOMification the implementation differences beween the two will tend go away.
I agree. The distinction is just that machine models often have a dependency on target-ARCH/ files, and that would be (for me) the line between hw/ and hw/ARCH.
Paolo
Am 01.07.2012 17:26, schrieb Paolo Bonzini:
Quoted 7 lines
Il 29/06/2012 14:26, Andreas Färber ha scritto:
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Oh, I see. Should we place this device to hw/Makefile.objs in v2?
That would've been nice, but I'll do it as a follow-up now.
Yes, so we can also use Anthony's new
CONFIG_ARCH_ARM(introducingCONFIG_EXYNOScan be done later).
I have a patch in the works, but exynos turned out more difficult than other devices (also OMAP and PXA2xx) because it uses a shared <socname>.h header that uses CPU. For tegra I fixed that by adding an #ifdef NEED_CPU_H for the appropriate parts.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Am 02.07.2012 11:31, schrieb Peter Maydell:
Quoted 8 lines · Igor Mitsyanko
Quoted 6 lines
So, what's the consensus here, for now new devices go to hw/arm/Makefile.objs while somebody moves all new and old not cpu-specific devices (not just exynos-related) from hw/arm/Makefile.objs to hw/Makefile.objs with one commit? Because having one RTC device compile through hw/Makefile.objs while all other exynos devices are compiled through hw/arm/Makefile.objs doesn't makes much sense.
Quoted 7 lines
I don't want things moved piecemeal, especially not one file from a whole board model.
I'd also like to see a nice clear summary of the ground rules first (ie how you decide which makefile / target / whatever a file should be in). At the moment I'm not really sure what the rules are, which means I can't properly review those bits of patches.
We've been through that like three times lately, not sure what's left to discuss there?
There's two things to review in the migration we're discussing:
1) Are files compiled before the conversion still compiled afterwards?
2) Does the build break due to use of CPU or explicit swapping?
For new patches you should keep on eye on whether a new device really must go into hw/arm/Makefile.objs or whether it can go in hw/Makefile.objs instead. I.e., hw/Makefile.objs (libhwX/) should be the rule for devices, not the exception. Machines today are tightly coupled to the CPU and need to go into hw/arch/Makefile.objs always. Whether the files get placed into hw/arch/ or hw/ is a matter of taste.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Quoted 9 lines · Andreas Färber
Am 01.07.2012 17:26, schrieb Paolo Bonzini:
Quoted 7 lines
Il 29/06/2012 14:26, Andreas Färber ha scritto:
Quoted 3 lines
Quoted 2 lines
Quoted 2 lines
Oh, I see. Should we place this device to hw/Makefile.objs in v2?
That would've been nice, but I'll do it as a follow-up now.
Yes, so we can also use Anthony's new
CONFIG_ARCH_ARM(introducingCONFIG_EXYNOScan be done later).
Quoted 7 lines
I have a patch in the works, but exynos turned out more difficult than other devices (also OMAP and PXA2xx) because it uses a shared <socname>.h header that uses CPU. For tegra I fixed that by adding an #ifdef
NEED_CPU_Hfor the appropriate parts.Andreas
I think we can drop ARMCPU *cpu[] member from Exynos4210State and just use local variable in exynos4210_init() instead, like everyone else does.exynos4210_write_secondary() prototype can be moved from exynos4210.h header to exynos4_boards.c, or we can pass arm_boot_info exynos4_board_binfo to Exynos4210 SoC init function exynos4210_init() to initialize .write_secondary_boot field there.
Quoted 12 lines · Andreas Färber
Am 02.07.2012 11:31, schrieb Peter Maydell:
Quoted 11 lines · Igor Mitsyanko
Quoted 6 lines
So, what's the consensus here, for now new devices go to hw/arm/Makefile.objs while somebody moves all new and old not cpu-specific devices (not just exynos-related) from hw/arm/Makefile.objs to hw/Makefile.objs with one commit? Because having one RTC device compile through hw/Makefile.objs while all other exynos devices are compiled through hw/arm/Makefile.objs doesn't makes much sense.
I don't want things moved piecemeal, especially not one file from a whole board model.
Quoted 7 lines
Quoted 4 lines
I'd also like to see a nice clear summary of the ground rules first (ie how you decide which makefile / target / whatever a file should be in). At the moment I'm not really sure what the rules are, which means I can't properly review those bits of patches.
We've been through that like three times lately, not sure what's left to discuss there?
It's not in docs/ or in some makefile as a comment. I don't mean "I want another mailing list thread"...
-- PMM
Am 02.07.2012 11:37, schrieb Paolo Bonzini:
Quoted 17 lines
Il 02/07/2012 11:31, Peter Maydell ha scritto:
Quoted 8 lines · Igor Mitsyanko
Quoted 6 lines
So, what's the consensus here, for now new devices go to hw/arm/Makefile.objs while somebody moves all new and old not cpu-specific devices (not just exynos-related) from hw/arm/Makefile.objs to hw/Makefile.objs with one commit? Because having one RTC device compile through hw/Makefile.objs while all other exynos devices are compiled through hw/arm/Makefile.objs doesn't makes much sense.
Quoted 7 lines
I don't want things moved piecemeal, especially not one file from a whole board model.
I'd also like to see a nice clear summary of the ground rules first (ie how you decide which makefile / target / whatever a file should be in). At the moment I'm not really sure what the rules are, which means I can't properly review those bits of patches.
Quoted 6 lines
For now nothing should change compared to the past, except that obj-y should appear in hw/ARCH/Makefile.objs rather than Makefile.target. This is because there is still no mechanism to guard the build of ARM-only devices from hw/Makefile.objs. When Anthony's patch lands, we can start moving files to hw/Makefile.objs using
CONFIG_ARCH_ARM; I understood Andreas is going to do that.
Not quite. What I started long before Anthony's patch is making devices (first Xilinx then ARM) less dependent on my CPU changes. That does not need CONFIG_[ARCH_]* in our current system. With armeb in mind I've gone for SoC-level and more fine-granular for generic devices.
Andreas
Signature · 2 lines
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg