Thread (11 messages) 11 messages, 4 authors, 2011-10-05
STALE5473d

[PATCH V2 2/2] ARM: SAMSUNG: Cleanup resources by using macro

From: Kukjin Kim <hidden>
Date: 2011-10-04 12:45:23
Also in: linux-samsung-soc

Sylwester Nawrocki wrote:
On 10/03/2011 03:13 PM, Kukjin Kim wrote:
quoted
On 10/03/11 12:53, Kyungmin Park wrote:
quoted
On Mon, Oct 3, 2011 at 12:41 PM, Kukjin Kim[off-list ref]
wrote:
quoted
quoted
quoted
+#define SAMSUNG_RES_MEM(soc, ip, sz)
DEFINE_RES_MEM(soc##_PA_##ip, sz)
quoted
quoted
quoted
+#define SAMSUNG_RES_IRQ(ip)            DEFINE_RES_IRQ(IRQ_##ip)
+
+#define SAMSUNG_RES_MEM_NAMED(soc, ip, sz, name)       \
+
DEFINE_RES_MEM_NAMED(soc##_PA_##ip, sz, name)
quoted
quoted
quoted
+#define SAMSUNG_RES_IRQ_NAMED(ip, name)
\
quoted
quoted
quoted
+                               DEFINE_RES_IRQ_NAMED(IRQ_##ip,
name)
quoted
quoted
quoted
+#define SAMSUNG_RES_DMA_NAMED(ch, name)
\
quoted
quoted
quoted
+
DEFINE_RES_DMA_NAMED(DMACH_##ch, name)
quoted
quoted
It's good for readability. but do you think that it's hard to find out
defined macros are used at real place?
e.g., Now I want to find out the S3C_PA_USB_HSOTG. it's difficult if
you use the SAMSUNG_RES_* series macro.
but if you use the DEFINED_RES_* series directly. it's easy to find
out at real codes.
Well, I don't think so because the XXX_PA_XXX addresses are defined in
each
quoted
mach/map.h and they are usually used in here so it's not hard to find
it.
Some minor disadvantage is that tagging tools like e.g. gtags don't handle
these things properly. But I don't think it's really important.
quoted
And now the 'S3C', 'S5P' and 'SAMSUNG' are used in the 'soc' part. I'm
preparing to consolidate the name and to remove duplicated resources.
Do you also have any specific plans for supporting single image build for
multiple SoC's while working on this ?
Hmm, you could see through my plan :)
As you know, we need to sort out resources and platform data to support
single kernel image so I'm preparing it after this.

Thanks.

Best regards,
Kgene.
--
Kukjin Kim [off-list ref], Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help